Description
docker-autocompose is a command-line tool that reads a running Docker container and writes a docker-compose YAML definition for it. It is useful when you started containers by hand with many options for volumes, ports and environment variables and want to recreate them later without remembering the exact command. You can name several containers at once to get one compose file that covers them together. The output follows compose file version 3 by default, and the -v 1 option writes version 1 instead. The tool is a Python project managed with Poetry, and it needs the pyaml and docker packages. The README gives three ways to run it: install it into your user Python, pull the Docker image published on GitHub, or build the image from the repository. It also mentions unofficial Arch User Repository packages, which the maintainers do not test or update. It is open source and suits people who run containers outside of Compose and want to move them into it.…
Highlights
- Generates docker-compose YAML from a running container
- Several containers written into one compose file
- Compose file version 1 or 3 output
- Runs with Poetry, pip or from a Docker image
Ratings & Reviews
No ratings yet
Be the first to rate Docker Autocompose.
People also visit

docker-compose-orchestration
Container orchestration with Docker Compose for multi-container applications
Docker Autocompose FAQ
What does docker-autocompose do?
It inspects a container that is already running and prints a docker-compose YAML file that describes it, including its volumes, ports and environment variables.
Can I include several containers?
Yes. Give several container names on the command line and the tool writes them into one compose file.
Which compose version does it write?
Version 3 by default. Add -v 1 to produce the version 1 format.
How do I install it?
Install Poetry, run poetry install in the project, then run poetry run autocompose. The README also covers a user-level pip install, which it says is discouraged system-wide, and running the tool from its Docker image.
What are the best Docker Autocompose alternatives?
Popular alternatives to Docker Autocompose include Nautical Backup and Frappe Docker. See all Docker Autocompose alternatives







