Skip to content

docker run to Compose Converter - Online YAML Generator

100% LocalCode

Convert docker run commands into docker-compose.yml instantly: ports, volumes, env vars, restart policies and networks mapped automatically, with multi-line and --flag=value support. Runs entirely in your browser.

This tool runs entirely in your browser. Open DevTools → Network panel and search your input — it appears in no request.

FAQ

The common 90%: -p ports, -v volumes, -e env vars, --env-file, --name, --restart, --network, -h, -u, -w, --entrypoint, -m, --cpus, --privileged, --mount (bind/volume), plus the container command after the image. Unknown flags never break the conversion — they are listed as warnings for manual review.

A bare -e DEBUG (without =value) passes through a host environment variable, which a compose file cannot express. Rewrite it as -e DEBUG=value and convert again.

Save it as docker-compose.yml and run docker compose up -d. Modern docker compose (v2) does not need a version field — that is exactly the format this tool emits.

No. Parsing and YAML generation happen entirely in your browser with zero network requests, so commands containing passwords or internal hosts are safe to paste.

Related Tools

Related Articles

Advertisement

Developer Recommendations

Sponsored