Turn a one-off command into configuration
Convert a proven docker run draft into a Compose starting point that is easy to keep under version control.
Guide
docker run to Compose first splits the command with its own shell-style tokenizer, then maps the supported long and short flags onto a Compose service object, and finally serialises it into compose.yaml with js-yaml. It does not run Docker; flags that cannot be mapped directly, or that it does not recognise, are left in the warnings area rather than being dropped silently.
Updated 2026-09-102 min read
docker run command; sudo, docker container run, single and double quotes and end-of-line continuations are all accepted.compose.yaml.docker compose config and then decide whether to run it.| Input | Output | Notes |
|---|---|---|
-p 8080:80 |
ports |
Port mapping |
-v data:/app |
Service volumes plus a top-level volume | A named volume is declared automatically |
--gpus all |
A warning | Suggests writing deploy devices by hand |
\ plus newline and the backtick continuation common on Windows; it is not a full POSIX shell and performs no variable expansion, command substitution, redirection or piping.docker run; the first non-flag token is taken as the image and everything after it as the container command.--network-alias, a fixed IP, GPUs and --volumes-from raise a warning that manual adjustment is needed.-d, --rm and -P that only have meaning for the docker run client or the way it runs do not produce an incorrect Compose configuration; instead they are explained.Convert a proven docker run draft into a Compose starting point that is easy to keep under version control.
Use the warnings area to find the flags that cannot be mapped automatically, so nothing is quietly lost in the conversion.
No, the page only parses text and generates YAML.
Validation should not be skipped; the implementation itself suggests checking with docker compose config first.
The Docker command is parsed locally in the browser only; no connection is made to a Docker daemon, an image registry or a server. Secrets or environment variables inside the command are not uploaded by this tool either.
Updated 2026-09-10
Turn a docker run command into compose.yaml, covering 30+ common flags and flagging anything unrecognized
Paste the full command; multi-line continuations with \ and quoted arguments are supported, and the conversion is live