docker run ↔ Compose
Convert docker run commands to docker-compose and back
Convert docker run commands to a docker-compose.yml and Compose services back to docker run, with warnings for anything that doesn’t map.
- Docker
- Compose
- YAML
- docker run
How to use docker run ↔ Compose
- Paste one or more
docker runcommands, or a Compose file, into the input, drop a file on it, or use Open file. docker run example and Compose example load samples. - Leave the direction on Auto-detect (a command that starts with
docker,podmanorsudo dockeris converted to Compose, anything else is read as Compose YAML), or choose docker run → Compose or Compose → docker run. - For Compose → docker run, tick Add -d (detached) and One option per line as you like.
- Read the warnings and notes under the output, then copy the result, download it as
docker-compose.ymlordocker-run.sh, or send it to another tool. - Switch to the Service Builder tab to construct multi-service architectures visually. Load starter templates (Frontend + API, API + PostgreSQL, API + Redis, Full Stack), configure health checks and dependencies, inspect port conflict warnings, and export both
docker-compose.ymland.env.example.
How it works
The command is split into words with a POSIX shell tokenizer (quotes, backslash line continuations,