Free Docker Run to Compose Converter

Paste a docker run command, get a clean docker-compose.yml back.

Privacy Level 1 — 100% local: your files never leave your browser
Free plan: convert one command at a time, unlimited use. Docker Run to Compose Pro adds batch conversion of whole stacks.

Your docker run command

Something not working?

Tell us what went wrong — it helps us fix the tool. Only what you type below is sent; your commands never leave your device.

Need more power? Meet Docker Run to Compose Pro

One-time payment. Yours forever. No subscription.

$29
single payment · lifetime updates included
FeatureFreePro
Convert one docker run commandYesYes
Ports, env vars, volumes, restart, networkYesYes
Copy & download docker-compose.ymlYesYes
Batch: whole stack of commands → one file—Yes
Multi-service stacks with depends_on—Yes
Saved conversion presets—Yes
AdsShown on pageAd-free
Updates—Lifetime free updates

Frequently asked questions

Is my docker run command uploaded anywhere?

No. The command is parsed entirely inside your browser. That matters because run commands often contain production passwords (-e POSTGRES_PASSWORD=...), API keys and private hostnames — none of it ever leaves your device.

Which docker run flags are converted?

Container name, ports (-p, including IP-bound and UDP mappings), environment variables (-e), volumes (-v, named and bind), restart policy, network, user, working directory, entrypoint, labels, hostname and env files. Flags with no Compose equivalent (--rm, --privileged, --cap-add) are listed as warnings so you can add them by hand.

Do I need the version line in docker-compose.yml?

Not with modern Docker Compose (v2), which ignores it — the converter leaves it out by default. Tick the checkbox if you run an older Compose v1 setup that still expects version: '3.8'.

What happens to named volumes?

A volume like pgdata:/var/lib/postgresql/data is detected as a named volume and declared in a top-level volumes: block, so docker compose up creates it automatically. Bind mounts (/host/path:/path) are passed through unchanged.