Turn docker run into a compose file
Paste the docker run line from a README. You get a docker-compose.yml, a row for every flag saying where it went or why it was not converted, and the /check/ findings for the result. It is read in this tab only, so the passwords in your -e flags stay with you.
Every flag, and where it went
| Flag as typed | In the compose file |
|---|
What /check/ finds in it
How it converts
- Every option of
docker runis accounted for. The list is the Options table of Docker's docker container run reference for Docker 29.7.2, 103 options, fetched 2026-10-02. Each one either maps to a Compose key or has a written reason it does not, and the test suite runs a command for every one of them. A flag that is not in that list gets a row saying so instead of disappearing. - The command is split the way a shell splits it, and nothing runs. Single and double quotes, backslash line breaks (also Windows CRLF),
sudo, a leading$prompt, comments and short flags written together (-it,-p8080:80) all work. Lines that are notdocker runare listed as skipped. - A
$means what it meant in your shell. Compose also fills in$VARand${VAR}, from your shell or a.envfile, so-v "$PWD":/workstays$PWD:/work. A literal$(inside single quotes, or written\$) becomes$$, which is how Compose writes a dollar sign it must not replace. - Named volumes and networks are declared.
-v uptime-kuma:/app/dataaddsuptime-kumaunder the top-levelvolumes:. Commands that share--network appnetbecome services on one network, declared once withname: appnetso Compose does not prefix it with the project name.--network host,none,bridgeandcontainer:xbecomenetwork_mode:. - Some flags have no Compose equivalent, and the table says which.
-dbelongs todocker compose up -d;--rmtodocker compose run --rm;-Pneeds the ports written out.--linkis legacy: on a shared network services find each other by service name, and the row names the network and the alias to add. - Ports and long forms stay exact.
-p 127.0.0.1:8080:80/udpand-p 8000-8010:8000-8010are copied as quoted strings (unquoted, YAML 1.1 parsers read22:22as a base-60 number).--mount type=bind,src=…,dst=…,readonlybecomes the long volume syntax withread_only: true;--ulimit nofile=1024:2048becomessoft: 1024, hard: 2048;--stop-timeout 30becomesstop_grace_period: 30s;--health-cmdbecomes aCMD-SHELLhealthcheck. - Known apps get compared with their official file. When the image is one of the 70 apps dankhost documents, the page links that app and lists what its official compose file has that the one-liner lacks: a database or companion service,
depends_on, variables, volumes, a healthcheck. Open WebUI's README line, for example, has no Ollama service and noWEBUI_SECRET_KEY.
What this cannot do
- It runs nothing. No image is pulled and no container started, so it cannot tell whether an image or a tag exists, or whether the app starts with these settings.
- It does not read the files your flags name.
--env-file,--label-fileand bind-mount sources are copied as paths; their contents are never read, so the app comparison cannot see variables that only your env file sets. - It does not run your shell.
$(…)and backticks are kept as text (with$escaped), not executed, and shell variables are left for Compose to fill in. - It knows one Docker version. Options are those of Docker CLI 29.7.2 (103 options, fetched 2026-10-02). An option added later shows up as not an option of
docker run, and option values are copied, not validated. - A few forms are not converted.
--gpuswith capabilities or a driver,--mountkeys Compose has no field for (such asbind-recursive), and--ipwithout a user network are named in the table; you write those by hand.