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.
TL;DR: Convert docker run commands into docker-compose.yml with one click: ports, volumes, env vars and restart policies mapped automatically, unmapped flags surfaced as warnings. Fully local, nothing leaves 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
Container Name Is Already in Use: Resolving the Conflict Error
docker run fails with Conflict. The container name /xxx/ is already in use? An old container with the same name still exists — stopped containers keep their names too. Covers finding the squatter with docker ps -a, rm -f to free it, compose down for project leftovers, --rm for one-shot runs, and restart-policy resurrections.
Docker port is already allocated: Finding and Freeing the Taken Port
docker run fails with port is already allocated or bind: address already in use? The host-side port you mapped is taken — by another container's docker-proxy or a host process. How to tell the two apart, the compose project-name collision scenario, and why 127.0.0.1 and a specific IP binding can coexist.
docker pull access denied: 5 Reasons Image Pulls Get Rejected (and the Fix)
docker pull fails with pull access denied for xxx, repository does not exist or may require docker login? Covers misspelled image names, missing tags, private registry login, Docker Hub rate limits, and registry mirrors for mainland China networks — with a one-minute triage flow.