{"id":15020049,"url":"https://github.com/red5d/docker-autocompose","last_synced_at":"2025-05-13T22:01:56.730Z","repository":{"id":39865591,"uuid":"48925653","full_name":"Red5d/docker-autocompose","owner":"Red5d","description":"Generate a docker-compose yaml definition from a running container","archived":false,"fork":false,"pushed_at":"2024-11-13T17:17:10.000Z","size":60,"stargazers_count":2103,"open_issues_count":17,"forks_count":223,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-12T12:46:34.016Z","etag":null,"topics":["automation","compose","docker","docker-compose"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Red5d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-02T22:15:37.000Z","updated_at":"2025-04-12T03:59:36.000Z","dependencies_parsed_at":"2023-11-28T03:25:10.356Z","dependency_job_id":"0af247c2-af0b-4892-bf1f-04ed4c6e0ae8","html_url":"https://github.com/Red5d/docker-autocompose","commit_stats":{"total_commits":56,"total_committers":19,"mean_commits":"2.9473684210526314","dds":0.5178571428571428,"last_synced_commit":"d3aa07ee74fc6e4dcd2277ac8cb597a9923a719c"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Red5d%2Fdocker-autocompose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Red5d%2Fdocker-autocompose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Red5d%2Fdocker-autocompose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Red5d%2Fdocker-autocompose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Red5d","download_url":"https://codeload.github.com/Red5d/docker-autocompose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251517412,"owners_count":21601971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","compose","docker","docker-compose"],"created_at":"2024-09-24T19:54:31.228Z","updated_at":"2025-04-29T14:26:39.823Z","avatar_url":"https://github.com/Red5d.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-autocompose\nGenerates a docker-compose yaml definition from a docker container.\n\nRequired Modules:\n* [pyaml](https://pypi.python.org/project/pyaml/)\n* [docker](https://pypi.python.org/project/docker)\n\nFor building this project [poetry](https://python-poetry.org/) is required. Install it with the package manager of your OS or if that's impossible with `pip`.\n\nInstall them:\n\n    poetry install\n\nExample Usage:\n\n    poetry run autocompose \u003ccontainer ids\u003e\n\n\nGenerate a compose file for multiple containers together:\n\n    poetry run autocompose apache-test mysql-test\n\n\nThe script defaults to outputting to compose file version 3, but use \"-v 1\" to output to version 1:\n\n    poetry run autocompose -v 1 apache-test\n\n\nOutputs a docker-compose compatible yaml structure:\n\n[docker-compose reference](https://docs.docker.com/compose/)\n\n[docker-compose yaml file specification](https://docs.docker.com/compose/compose-file/)\n\nWhile experimenting with various docker containers from the Hub, I realized that I'd started several containers with complex options for volumes, ports, environment variables, etc. and there was no way I could remember all those commands without referencing the Hub page for each image if I needed to delete and re-create the container (for updates, or if something broke).\n\nWith this tool, I can easily generate docker-compose files for managing the containers that I've set up manually.\n\n## Native installation\n\nSystem-wide installation is discouraged. If you really need to, you can run `pip install --user --break-system-packages .` (use at your own discretion).\n\nThere are unofficial packages available in the Arch User Repository:\n* [Stable](https://aur.archlinux.org/packages/docker-autocompose)\n* [Development (follows the master branch)](https://aur.archlinux.org/packages/docker-autocompose-git)\n\n**AUR packages are provided by a third party and are not tested or updated by the maintainer(s) of the docker-autocompose project.**\n\n## Docker Usage\n\nYou can use this tool from a docker container by either cloning this repo and building the image or using the [automatically generated image on GitHub](https://github.com/Red5d/docker-autocompose/pkgs/container/docker-autocompose)\n\nPull the image from GitHub (supports both x86 and ARM)\n\n    docker pull ghcr.io/red5d/docker-autocompose:latest\n\nUse the new image to generate a docker-compose file from a running container or a list of space-separated container names or ids:\n\n    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose \u003ccontainer-name-or-id\u003e \u003cadditional-names-or-ids\u003e...\n\nTo print out all containers in a docker-compose format:\n\n    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose $(docker ps -aq)\n    \n## Contributing\n\nWhen making changes, please validate the output from the script by writing it to a file (docker-compose.yml or docker-compose.yaml) and running \"docker-compose config\" in the same folder with it to ensure that the resulting compose file will be accepted by docker-compose.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred5d%2Fdocker-autocompose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fred5d%2Fdocker-autocompose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred5d%2Fdocker-autocompose/lists"}