Yaykyi Tools

Docker Run to Compose Converter Online

Convert docker run commands to docker-compose.yml automatically. Supports -p, -v, -e, --name, --network flags. Free online tool.

⌘ KSearch tools⌘ ↵Process⌘ ⇧ CCopy result

What is Docker Run to Compose Converter Online?

Docker Compose is the standard for defining multi-container Docker applications. Converting a docker run command to Compose format is tedious manually. This tool parses the complete docker run command and generates a valid docker-compose.yml service block.

How to Use Docker Run to Compose Converter Online

  1. Paste your full docker run command.
  2. The docker-compose.yml service block is generated instantly.
  3. Copy into your docker-compose.yml file.

Example

Converted service block

Input

docker run -d -p 8080:80 -e ENV=prod --name myapp nginx

Output

services: myapp: image: nginx ports: - "8080:80"

Frequently Asked Questions

Does it handle volume mounts?

-v and --volume flags are converted to volumes: entries under the service definition.

See Also