Web Tools
Docker Run to Compose Converter
Convert docker run commands to docker-compose.yml format. Parses ports, volumes, environment variables, networks, health checks, resource limits, and 30+ flags. Runs entirely in your browser — your data never leaves your machine.
docker docker-compose devops container yaml converter
Published May 29, 2026
All interactive tools run entirely in your browser. Your data never leaves your device.
How It Works
Paste a docker run command and instantly get an equivalent docker-compose.yml service definition. The parser tokenizes the command, handles quoted strings, and maps 30+ Docker CLI flags to their Compose equivalents.
Features
- 30+ flags supported: ports, volumes, env vars, networks, restart policy, health checks, capabilities, logging, resource limits, and more
- Quoted strings: handles single and double-quoted values with escaping
- Health checks:
--health-cmd,--health-interval,--health-timeout,--health-retries - Resource limits:
--memory,--cpus,--shm-size - Logging config:
--log-driverand--log-opt - Network section: automatically generates top-level
networks:for custom networks - Warnings: unknown flags are reported, not silently dropped
- 5 examples: from simple Nginx to complex multi-flag setups
- Copy output: one-click copy of the generated YAML
- Private: runs entirely in the browser — no data transmitted
Use Cases
- Migrating ad-hoc
docker runcommands todocker-compose.yml - Converting one-liners from README docs into Compose services
- Learning the Compose YAML equivalents of CLI flags
- Standardizing container configurations for team workflows