Docker Compose Generator
Build a multi-service docker-compose.yml from a simple form, runs entirely in your browser.
About this tool
Add one or more services, each with an image (or leave it blank to build from a local Dockerfile), port mappings, environment variables, and other services it depends on, and get back a complete, correctly indented docker-compose.yml. Multiple ports, environment variables, and dependencies per service are all supported.
The generated file deliberately has no top-level version: key. Compose file format 3.x made it informational only years ago, and current versions of docker compose print a deprecation warning if it is present, so a freshly generated file that includes it would start its life already showing a warning.
Useful for quickly scaffolding a local development stack, a web service plus its database plus a cache, without hand-writing YAML indentation, which is the most common source of a compose file that silently does the wrong thing.
Frequently asked questions
- Why is there no "version:" line at the top of the file?
- The Compose Specification (what current docker compose implements) dropped the versioned file formats; the version key is now ignored, and recent Compose releases print a deprecation warning if they see one. Omitting it produces a file that works cleanly with no warnings on current tooling.
- What happens if I leave a service’s image blank?
- The service gets "build: ." instead of an image line, telling Compose to build an image from a Dockerfile in the current directory rather than pulling a pre-built one. Use the Dockerfile Generator tool alongside this one if you need that Dockerfile too.
- How do I express a container port mapped to a different host port?
- Use "host:container" format in the ports field, e.g. "8080:80" maps host port 8080 to the container’s port 80. Separate multiple mappings with commas.
- Is my configuration sent anywhere?
- No. The compose file is assembled entirely in your browser, no network request is made.
Continue learning
- DocumentationDocker FundamentalsHow images, containers, volumes, and networks fit together in Docker's runtime model, and the shift from installing software to running images.
- BlogWhy Every Container in Your Rolling Deploy Takes an Extra 10 Seconds to StopWhy npm as PID 1 can prevent Node.js from receiving SIGTERM, trigger Docker's ten-second timeout, and end container shutdown with SIGKILL.
- ToolDockerfile GeneratorGenerate a working Dockerfile for Node.js, Python, Go, or a static site, runs entirely in your browser.
- DocumentationBash FundamentalsBash scripting from variables to functions, plus the quoting and exit-status habits that separate a script that looks right from one that fails safely.
- BlogTerraform Troubleshooting Guide: Fix the Errors Engineers Actually HitDiagnose Terraform initialization, validation, provider, authentication, state, drift, import, replacement, timeout, and CI failures with a safe workflow.
- ToolGitHub Actions Workflow GeneratorGenerate a starter CI workflow for Node.js, Python, or Go, runs entirely in your browser.