Docker run to Compose converter

Convert docker run commands into a docker-compose.yml file.

docker run commands

Paste docker run commands directly or import a .txt or .sh file from this device.

docker-compose.yml

Compose output updates as soon as the input contains a valid docker run command.

Paste a valid docker run command on the left to preview the generated Compose file here.

What it does

Docker Run to Compose Converter converts one or more docker run commands into a docker-compose.yml file in the browser. You can inspect the generated YAML, copy it, or download it before moving it into your project.

When to use it

Use it when you want to turn an ad hoc container command into a repeatable Compose service definition, or when you want to see how ports, volumes, environment variables, and resource flags map into Compose.

What to expect

Common options such as ports, environment variables, restart policy, healthchecks, mounts, and resource limits are preserved. Unsupported or ambiguous flags are surfaced as warnings so you can review the output before using it.

How to use

Convert docker run commands into a docker-compose.yml file.