Docker Compose Generator

Build a Docker Compose file visually — services, images, ports, volumes and environment variables.

100% FreeNo sign-upPrivate — runs in your browser

Copied to clipboard

How to use this tool

1
List your services

One service per line: name | image | ports | volumes | environment. Leave a section empty to skip it.

2
Pick a restart policy

unless-stopped is the usual default for servers that should survive a reboot.

3
Generate the file

The compose.yaml content appears in the output box.

4
Save and run it

Download as compose.yaml and run docker compose up in that folder.

Formula & worked example

Each service line is split on | into name, image, comma-separated ports, volumes and environment entries. Port mappings and values containing YAML-special characters are single-quoted; the restart policy is applied to every service.

Services "app | nginx:latest | 8080:80" and "db | postgres:16 | 5432:5432" produce a services: block with both services, quoted port mappings and restart: unless-stopped.

Limitations — read this before you rely on it

This covers single-host Compose services with image, ports, volumes, environment and restart policy only. Not covered: build: sections, networks, secrets, healthchecks, resource limits, profiles, multi-file overrides and Swarm deployment settings — add those by hand for production use.

Frequently asked questions

compose.yaml (modern) or docker-compose.yml (legacy) — both are read by Docker Compose.

Yes — Docker and Docker Compose on the machine that will run the services. This tool only writes the file.

No. Plain environment values in a compose file are visible to anyone who can read the file. Use Docker secrets or your platform's secret store for real credentials.

No. This version generates image-based services only. Add a build: section by hand if you build from a Dockerfile.

So YAML reads 8080:80 as a string mapping, not a number or sexagesimal value.