🔧

Docker Run → Compose

Convert docker run commands to docker-compose.yml.

How to Use

  1. Paste your docker run command into the input area — it must start with 'docker run'.
  2. The tool parses all recognized flags and generates a docker-compose.yml with ports, volumes, environment variables, networks, and restart policy.
  3. Copy the generated YAML and save it as docker-compose.yml in your project.

Frequently Asked Questions

Which docker run flags are supported?
Supported flags include -p/--publish (ports), -e/--env (environment), -v/--volume (volumes), --name, --restart, --network, -l/--label, and -d/--detach.
What version is the generated Compose file?
The output uses version: '3.8', which is compatible with Docker Compose v1 and v2 and supports most common features.
How do I handle multiple containers?
Convert each docker run command separately and then manually combine the resulting services blocks into a single docker-compose.yml file.