Skip to content
littlekit.app
All tools

Docker run to Compose

Convert supported static docker run arguments into Compose YAML without executing any commands.

One Compose servicewebnginx:alpine
1Ports
0Mounts
1Env names

Review the generated settings in your own environment before use. This preview has not launched or contacted Docker.

Compose conversion
Generated Compose YAML
services:
  web:
    container_name: web
    restart: unless-stopped
    image: "nginx:alpine"
    ports:
      - "8080:80"
    environment:
      APP_ENV: production

Detached mode is a launch choice and has no Compose file field.

Static argument conversion only. Images, paths, ports and runtime behavior are not checked. Literal dollars are escaped for Compose interpolation.

Processed on your device

How it works & useful details

How it works & supported syntax

Converts static POSIX-like docker run arguments: name, publish, env NAME=value, volume, restart, entrypoint, user, workdir, hostname, interactive, tty, read-only and privileged. -d is noted as a launch choice. Unknown flags, inherited environment values, shell operators, expansions and unquoted globs are rejected.

Volumes support absolute Linux source paths or named volumes with /container/path and optional ro/rw. Ports support single numeric ports, optional IPv4 host binding and protocol. No ranges, IPv6 bindings, mount-option DSL or Windows paths. Literal dollar signs are escaped for Compose interpolation. Commands are preserved as argument lists; nothing is executed or checked against Docker.

Local workspace

Your input stays in this page. These tools calculate or process text; they do not run commands, start containers, contact servers or change settings on your device.

Previews pause above 20,000 combined characters. Use the action to process the full supported input. Exports contain the complete result within the tool’s stated limits.