← All tools

docker run → Compose

Paste a docker run command, get a compose file back.

Why this exists

A long docker run command from a README is easy to lose and hard to review; a compose file is declarative and lives in git. The usual first step when adopting someone else's image into your own stack.

🔒 Runs in your browser — nothing is sent anywhere
docker run command
compose.yaml
services:
  web:
    image: nginx:alpine
    container_name: web
    restart: unless-stopped
    ports:
      - 8080:80
    volumes:
      - /data:/usr/share/nginx/html:ro
    environment:
      - TZ=UTC
  • detached mode — Compose handles this with `up -d`

Multi-line commands with trailing backslashes are fine.