Convert a docker run command into a docker-compose.yml service. Handles ports, volumes, env vars, name, restart, network and command.
Paste a docker run command (backslash line continuations are fine). Supported flags: -p, -v, -e, --name, --restart, --network, -u, -w, -h, --entrypoint, --privileged, -it, plus the trailing command. Unsupported flags are ignored, so review the output before use. Runs in your browser.
Related: JSON Formatter & Validator · Base64 Encode & Decode · URL Encoder & Decoder · SHA-256 / SHA-1 Hash Generator · Unix Timestamp Converter
-p becomes ports, -v becomes volumes, -e becomes environment and --name becomes container_name.
Review image tags and secrets before committing; avoid putting real passwords in the file.
The generated file omits the obsolete version key, which modern Compose ignores.
More free tools: 150+ free online calculators · Free printable planners