Skip to content
Define and run multi-container applications with Docker
Python Shell PowerShell
Latest commit 9e242cd @aanand aanand Merge pull request #3032 from dnephin/multiple_files_from_env_var
Support multiple files in COMPOSE_FILE env var
Failed to load latest commit information.
bin Rename binary to docker-compose and config file to docker-compose.yml
compose Merge pull request #3032 from dnephin/multiple_files_from_env_var
contrib Merge pull request #2932 from AvdN/patch-1
docs Support multiple files in COMPOSE_FILE env var.
experimental Update links
project Build osx binary on travis and upload to bintray.
script Build osx binary on travis and upload to bintray.
tests Merge pull request #3032 from dnephin/multiple_files_from_env_var
.dockerignore alpine docker image for running compose and a script to pull and run …
.gitignore Ignore extra coverge files
.pre-commit-config.yaml Extract helper methods for building config objects from dicts
.travis.yml Build osx binary on travis and upload to bintray.
CHANGELOG.md Add release notes for 1.6.2
CHANGES.md Rename CHANGES.md to CHANGELOG.md
CONTRIBUTING.md Move test scripts to script/test.
Dockerfile Fix jenkins CI by using an older docker version to match the host.
Dockerfile.run Add the git sha to version output
LICENSE Docker, Inc.
MAINTAINERS update maintainers file for parsing
MANIFEST.in Add the git sha to version output
README.md Used absolute links in readme
ROADMAP.md Update roadmap with state convergence
SWARM.md Update Swarm integration guide and make it an official part of the docs
appveyor.yml Move all build scripts to script/build
docker-compose.spec Merge v1 config jsonschemas into a single file.
logo.png include logo in README
requirements-build.txt Upgrade pyinstaller.
requirements-dev.txt Use py.test as the test runner
requirements.txt Add -f, --follow flag as option on logs.
setup.py Update docker-py and dockerpty
tox.ini Merge pull request #2388 from dnephin/fix_long_lines

README.md

Docker Compose

Docker Compose

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration. To learn more about all the features of Compose see the list of features.

Compose is great for development, testing, and staging environments, as well as CI workflows. You can learn more about each case in Common Use Cases.

Using Compose is basically a three-step process.

  1. Define your app's environment with a Dockerfile so it can be reproduced anywhere.
  2. Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment:
  3. Lastly, run docker-compose up and Compose will start and run your entire app.

A docker-compose.yml looks like this:

web:
  build: .
  ports:
   - "5000:5000"
  volumes:
   - .:/code
  links:
   - redis
redis:
  image: redis

For more information about the Compose file, see the Compose file reference

Compose has commands for managing the whole lifecycle of your application:

  • Start, stop and rebuild services
  • View the status of running services
  • Stream the log output of running services
  • Run a one-off command on a service

Installation and documentation

Contributing

Build Status

Want to help build Compose? Check out our contributing documentation.

Releasing

Releases are built by maintainers, following an outline of the release process.

Something went wrong with that request. Please try again.