Is my command uploaded?
No. The conversion runs in your browser, which matters because docker run commands often contain passwords in -e flags. Share links are turned off when the command contains what look like secrets.
Convert one or more docker run commands into a Compose file (compose.yaml, no obsolete version key): ports, volumes, env, networks, healthchecks, GPUs and more.
Loading docker run → Compose…
Loading docker run → Compose…
Most container setups start as a docker run command in a README and end up in a compose.yaml. Translating by hand means remembering that -p becomes ports, -e becomes environment, --restart keeps its value, --health-cmd becomes a healthcheck test, --gpus becomes a deploy.resources.reservations.devices block, and that named volumes and networks must also be declared at the top level. This converter does that for one or many commands. It parses bash, cmd and PowerShell quoting (with line continuations) using the same tokenizer as the cURL converter, understands both "--flag value" and "--flag=value" as well as clustered short flags like -dit, and supports about sixty flags: ports, volumes and --mount, environment and env files, networks and network modes, restart policy, user, working directory, entrypoint and command, capabilities, devices, GPUs, healthchecks, labels, extra hosts, DNS, resource limits, ulimits, logging, tmpfs, sysctls and more. The output follows the current Compose Specification, validates against its JSON schema, masks secret-looking environment values as ${VAR} references if you choose, and lists every flag it could not convert.
Commands are split per line (continuations with \, ^ or ` are joined), tokenized with the right shell rules, and read as docker run [options] image [command]. sudo and "docker container run" are accepted. Anything after && or ; on a line is ignored with a note.
Each option maps to its Compose key; list options (ports, volumes, labels, cap_add…) accumulate. Services are named after --name, or the image name when there is none, and get container_name when --name was given. Keys are written in a conventional order: image, name, restart, command, environment, ports, volumes, networks, and so on.
Named volumes are declared under volumes:. User-defined networks are declared under networks: with a comment explaining external: true for networks that already exist. host, none and container:<name> become network_mode.
The test suite converts Postgres, Redis and Nginx commands among others, parses the YAML and validates it against the official Compose Specification JSON schema. Values that YAML would misread — port mappings like 80:80, yes/no, numbers-as-strings — are quoted.
Short answers for the things developers usually ask before trusting a tool.
No. The conversion runs in your browser, which matters because docker run commands often contain passwords in -e flags. Share links are turned off when the command contains what look like secrets.
The top-level version key is obsolete. Docker Compose v2 follows the Compose Specification, ignores version and warns about it. The generated file validates against the Compose Specification JSON schema.
-i and -t map to stdin_open: true and tty: true. -d (detached) and --rm have no key in a Compose file: you get detached mode with "docker compose up -d", and one-off removable containers with "docker compose run --rm". The output includes a comment explaining this rather than silently dropping them.
Bind mounts (paths starting with /, ./ or ~) stay as they are, and $(pwd)/x becomes ./x because Compose resolves relative paths from the compose file's folder. Named volumes (-v pgdata:/var/lib/postgresql/data) are also declared under the top-level volumes: key so Compose creates them. --mount is converted to the long volume syntax.
Paste several docker run commands, one per line. Each becomes a service, and a shared --network becomes a top-level network. Within one Compose project, services can reach each other by service name, so --link is no longer needed.
Anything without a Compose equivalent (like -P, publish all) or not recognised is listed under the output instead of being dropped silently. Check that list before relying on the file.
Useful follow-ups when one conversion usually turns into three more.
Convert .env files to Dockerfile, docker-compose, GitHub Actions, Vercel, Kubernetes ConfigMap, and more.
Flatten ASP.NET Core appsettings.json into Section__Key environment variables for .env, Docker Compose, Kubernetes, Azure App Service, PowerShell, and bash — or rebuild the JSON from env vars.
Format and validate YAML, or convert between YAML and JSON. Essential for Kubernetes, Docker, and CI configs.