docker run to Compose Converter
Paste a docker run command and get the equivalent compose.yaml service. It handles ports, volumes, environment variables, devices, restart policy, networks, and the other common flags. Runs in your browser as you type.
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
restart: unless-stopped
ports:
- "8096:8096"
environment:
- TZ=America/New_York
volumes:
- /srv/jellyfin/config:/config
- /srv/media:/media:ro
devices:
- /dev/dri:/dev/driWhy move to Compose
A long docker run line is fine once, but it lives only in your shell history. A Compose file is the same container written down: versioned, easy to read, and started with one command. For a homelab it is the difference between remembering how you launched something and being able to rebuild it.
A couple of things do not carry over cleanly. --rm has no Compose equivalent and is dropped, and a named network is emitted as external: true on the assumption it already exists. Skim the result before you run it; the converter flags anything it could not place.
Picking a stack to run Compose files with? Docker vs Podman and Dockge vs Portainer cover running and managing them.