How to use it
- 1Paste your docker run or drop a file onto the input panel.
- 2Adjust the options — the result updates as you type.
- 3Copy the Docker Compose or download it. Drop several files to convert a batch into one ZIP.
What is converted
Ports, volumes (including --mount syntax), environment variables and env files, networks and aliases, restart policy, user, working directory, entrypoint and command, capabilities, devices, DNS, extra hosts, labels, logging, health checks, ulimits, sysctls, memory and CPU limits, and GPU reservations.
Named volumes and user-defined networks are declared at the top level. Networks are marked external, since a network named on the command line already exists on the host; remove that line to let Compose manage it.
Several commands — separated by new lines or && — become several services in one file. Shell quoting, backslash line continuations and clustered short flags such as -itd are parsed the way a shell would.
Questions
How do I get the docker run command of a running container?
If you no longer have it, docker inspect shows the configuration, and tools such as runlike can reconstruct the command. Paste the result here.
Why is restart: unless-stopped added?
A container started with -d and no --rm is meant to keep running, so the Compose service gets a restart policy that survives reboots. Commands with --rm don't get one.
Guides that use this tool
· 5 min read
From Docker Compose to Kubernetes: what translates and what you must redesign
Moving Docker Compose to Kubernetes: Deployments and Services, depends_on, volumes, secrets, health checks, cron jobs — and the parts that need a redesign.