Docker Run to Compose Converter
Paste a docker run command and instantly generate a docker-compose.yml file. Parses ports, volumes, environment variables, networks, restart policies, and more. 100% client-side.
About Docker Run to Compose
Docker Compose files are the standard way to define multi-container applications. This tool converts ad-hoc docker run commands into clean, version-controlled docker-compose.yml format.
Supported Flags
-p / --publish— port mappings (host:container)-v / --volume— volume mounts (host:container or named volumes)-e / --env— environment variables--name— container/service name-d / --detach— detached mode--restart— restart policy--network— network name-w / --workdir— working directory--hostname— container hostname--cpus, --memory— resource limits--entrypoint— custom entrypoint--env-file— environment file--label— container labels
Related Tools
- YAML Validator — validate the generated compose file
- JSON to YAML — convert between JSON and YAML
- Diff Checker — compare compose file changes