Docker Run to Compose

Paste a docker run command and get a clean docker-compose.yml back. Supports volumes, ports, env vars, networks, and more.

Paste a docker run command to convert
docker run command
docker-compose.yml
Examples
Supported flags
-p / --publish -v / --volume -e / --env --env-file --name -d / --detach --restart --network -w / --workdir --hostname --user --cpus --memory / -m --label / -l --cap-add --cap-drop --privileged --pid --log-driver --log-opt --entrypoint --link --dns --tmpfs --read-only --init --platform

Why DevOps engineers use this converter

🐳

27 flags supported

Handles ports, volumes, env vars, networks, restart policies, resource limits, capabilities, logging, and more.

Instant conversion

Paste your docker run command and get clean, properly indented docker-compose.yml output immediately.

📄

Multi-line support

Handles backslash line continuations, so you can paste commands exactly as they appear in documentation.

📋

Ready-to-use output

Output includes proper YAML indentation, service naming, and version declaration. Copy and use directly.

🎯

7 sample commands

Pre-built examples for Nginx, PostgreSQL, Redis, MongoDB, MySQL, Node.js, and WordPress.

🔒

100% client-side

Your docker commands stay in your browser. Nothing is sent to any server.