Docker Run to Docker Compose Converter

Transform cumbersome and lengthy docker run CLI commands into a clean, maintainable docker-compose.yml file. Runs 100% locally in your browser.

Presets:
•

🔗 Share this page

TelegramWhatsAppX

How to use

  1. Paste one or multiple docker run commands into the left pane (or click a sample preset like Nginx, Postgres, Redis, or Ollama).
  2. The parser automatically extracts container names, port forwardings, volume mounts, environment variables, networks, and restart policies.
  3. Copy the generated docker-compose.yml or download the YAML file directly with one click.

FAQ

Which docker run flags are supported?

Supports -p/--publish, -v/--volume, -e/--env, --name, --restart, -d/--detach, --network, --workdir, -u/--user, --hostname, --entrypoint, --privileged, -m/--memory, --cpus, and container command arguments.

Can I convert multiple docker run commands at once?

Yes! You can paste multiple `docker run` commands sequentially. The tool automatically groups them into a multi-service docker-compose.yml specification.

Is my sensitive environment configuration safe?

Yes, 100%. The command line tokenizer and YAML builder execute entirely inside your browser JavaScript runtime. No inputs or passwords are sent over the network.

🛠️

Related Developer & Office Tools

All tools →

Was this tool useful?

The site is free and has no paywalls. A small tip in TON or a share helps keep it running and add new tools.

Share in Telegram