FreeDev Tools

Docker Run to Compose

Convert docker run commands into docker-compose.yml service definitions.

Runs locally in your browser. Your input is not uploaded.

How to Use

  1. 1

    Paste the docker run command

    Multi-line commands with backslash continuations are handled.

  2. 2

    Review the YAML

    Ports, volumes, environment, and restart policy map to compose keys; unmapped flags appear in a comment.

  3. 3

    Save and run

    Save as docker-compose.yml and start with docker compose up -d.

Frequently Asked Questions

It parses the command's flags — ports (-p), volumes (-v), environment (-e), name, restart policy, network, workdir, user, entrypoint — and maps each to the equivalent docker-compose service key.