Paste a docker run command and click Generate to create docker-compose.yml
This tool automatically converts Docker run commands into Docker Compose YAML format. Instead of manually translating each flag and option, the converter parses your docker run command and generates a complete docker-compose.yml file.
| Docker Run Flag | Docker Compose Equivalent | Description |
|---|---|---|
-p, --publish |
ports |
Port mappings (host:container) |
-v, --volume |
volumes |
Volume mounts |
-e, --env |
environment |
Environment variables |
--name |
container_name |
Container name |
--restart |
restart |
Restart policy |
--dns |
dns |
DNS servers |
--network |
networks |
Network configuration |
--privileged |
privileged |
Privileged mode |
--label |
labels |
Container labels |
Docker Run Command
docker run -d \
--name nginx \
-p 8080:80 \
-v /data:/usr/share/nginx/html \
-e NGINX_HOST=localhost \
--restart unless-stopped \
nginx:latest
Generated docker-compose.yml
version: '3'
services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- "8080:80"
volumes:
- /data:/usr/share/nginx/html
environment:
NGINX_HOST: localhost
restart: unless-stopped
Generate compose files from form inputs
Convert docker-compose.yml to docker run commands
Convert Docker Compose to Kubernetes manifests
Convert Kubernetes manifests to Docker Compose
Generate Kubernetes Pod and Service specs
Parse and validate YAML files
Anyone with this link can view and download the Docker Compose file.
Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.