Docker Run to Compose Converter

Automation & DevOps

Convert any docker run command into a clean docker-compose.yml. Parses ports, volumes, env vars, restart policy and networks, with optional Traefik label generation.

100% Client-Side — Your data never leaves your browser.
Traefik
docker run Command
docker-compose.yml

Paste a docker run command — ports, volumes, env vars and more parse automatically.

How to Use

Three steps from raw data to finished output — no account required.

  1. 1

    Paste the full docker run command — flags like -p, -v, -e, --name, --restart and --network are parsed.

  2. 2

    Optionally enable Traefik labels and set the Host domain for automatic reverse-proxy routing.

  3. 3

    Copy the generated docker-compose.yml (Compose Specification) or download it next to your project.

Frequently Asked Questions

Everything you need to know about the docker run to compose converter.

--name, -p/--publish, -v/--volume, -e/--env, --env-file, --restart, --network, --network-alias, -l/--label, --hostname, -u/--user, -w/--workdir, --memory, --cpus, --expose, --entrypoint, --platform, --pull and the image plus command arguments — unrecognized flags are reported so nothing is silently dropped.

It generates traefik.enable, router (Host rule), entrypoint and load-balancer labels for the container, plus the external network stanza — so your service is reverse-proxied at the domain you choose without editing YAML by hand.

Yes. The output follows the modern Compose Specification (supported by Docker Compose v2+ and v3 file format): a services map with the image, container name, restart policy, quoted port mappings, volumes, environment map and networks.

Short -p mappings (8080:80, 127.0.0.1:8080:80, 80) become quoted ports entries, and -v paths or named volumes become volumes entries — named volumes are declared at the top level so docker compose up creates them automatically.