Docker Run to Compose - Convert docker run to docker-compose.yml Online

Transform single-line docker run commands into clean, standard docker-compose.yml configuration files instantly.

This tool runs in your browser.
Paste a simple docker run command.

How to use

  1. 01Paste a simple docker run command.
  2. 02Convert it to Compose YAML.

FAQ

What flags from docker run are automatically translated?

Flags including -p (ports), -v (volumes), -e (environment variables), --name, --restart, and --network are cleanly mapped to YAML directives.

Does the output conform to modern Compose specifications?

Yes. The generated YAML adheres to official Compose spec indentation and can be run immediately via docker compose up -d.

Are my private database passwords and volume paths kept secure?

Yes. The lexical parser and YAML serializer run strictly inside your browser sandbox without submitting commands to remote servers.