Docker Run to Compose
Convert docker run commands to a Docker Compose file, several at once with shared networks and volumes, or turn a compose file back. Private.
More options
docker run commands
Stays in your browsercompose.yaml
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to Docker Compose Builder or YAML ↔ JSON Converter.
Free Online Docker Run to Compose
Paste one or more docker run commands and get a compose file you can keep in your project. Flags that compose cannot express are kept as comments, never dropped silently. It gives developers a quick browser-based way to solve a focused docker run to compose task before moving the result into a project.
How to use Docker Run to Compose
Paste your docker run commands in the box on the left, or open a file, then press Convert. Put each command on its own line (a backslash at the end of a line is fine). Choose the other direction to turn a compose file back into commands.
Common mistakes
- Putting two commands on one line: write each docker run on its own line.
- Expecting --rm to carry over: compose keeps containers; use docker compose run --rm for one-off runs.