Docker run → Compose converter
Paste a docker run command and get a matching compose.yaml service — ports, environment, volumes, restart policy, network, working directory, user, entrypoint, and command.
Your command never leaves the browser — no upload, no server.
Input
Could not parse command
Warnings
Unsupported flags
Compose output
About this tool
docker run is great for one-off containers. When you need the same setup again — same ports, env vars, volumes — a Compose file is easier to version and share. This converter tokenizes your shell command (quotes and escapes included) and maps common flags to Compose fields.
Some runtime-only flags (--rm, -P, --env-file, GPU/device mounts) have no direct Compose equivalent and are listed as warnings or unsupported. Always review the generated YAML before deploying.
Read more
Free books, courses, and software
Get my programming books, course editions, and complete software.
Get the download library →