⛴
docker run → Compose
Map a docker run command field by field into a docker-compose.yml service — ports, volumes, environment, resource limits and health checks converted by semantics, every $ escaped to $$, and options with no equivalent refused rather than dropped.
Runs in browserDockerOps
Loading tool…
How to use
- Not flag names copied into field names: -p → ports, -w → working_dir, --stop-timeout → stop_grace_period where the unit also changes from seconds to a suffixed duration.
- Every $ in the YAML is escaped to $$. Compose interpolates the whole file, so one $ in a password becomes an empty value while the generated yml looks perfectly fine.
- Options without an equivalent are refused: --link, --volumes-from, --ip and --mac-address have no Compose form, and dropping them changes behaviour invisibly.
- Command substitution ($() and backticks inside double quotes) is refused outright — it would produce a config whose value is the literal text.
- Relative bind mounts are flagged: relative to the current directory in docker run, relative to the project root in compose — often not the same place.