Define and run multi-container applications with Docker
Python Shell PowerShell
Latest commit 5ade097 Jan 12, 2017 @shin- shin- committed on GitHub Merge pull request #4324 from shin-/4321-v3-depends-on
Provide valid serialization of depends_on when format is not 2.1
Permalink
Failed to load latest commit information.
bin Rename binary to docker-compose and config file to docker-compose.yml Jan 20, 2015
compose Provide valid serialization of depends_on when format is not 2.1 Jan 12, 2017
contrib Shell completion for --push-images Jul 27, 2016
docs updated README per vnext branch plan Oct 5, 2016
experimental Remove doc on experimental networking support Jul 25, 2016
project Update release process document to account for recent changes. Oct 21, 2016
script Merge pull request #4323 from shin-/fix-push-release-script Jan 12, 2017
tests Provide valid serialization of depends_on when format is not 2.1 Jan 12, 2017
.dockerignore Support entrypoint, labels, and user in the bundle. Jun 14, 2016
.gitignore Ignore extra coverge files Dec 10, 2015
.pre-commit-config.yaml Tests use updated get_config_paths_from_options signature Mar 24, 2016
.travis.yml Build osx binary on travis and upload to bintray. Mar 1, 2016
CHANGELOG.md Merge pull request #3961 from ankon/patch-1 Jan 9, 2017
CHANGES.md Rename CHANGES.md to CHANGELOG.md Aug 14, 2015
CONTRIBUTING.md Convert readthedocs links for their .org -> .io migration for hosted … Jun 8, 2016
Dockerfile Upgade pip to latest Apr 26, 2016
Dockerfile.run Fix docker image build script when using universal wheels Jan 11, 2017
Jenkinsfile Limit testing pool to Ubuntu hosts to avoid errors with dind not Nov 15, 2016
LICENSE Docker, Inc. Jul 24, 2014
MAINTAINERS update maintainers file for parsing Dec 4, 2015
MANIFEST.in Add the git sha to version output Nov 18, 2015
README.md fix(docs): updated documentation links Oct 24, 2016
ROADMAP.md Prevent unnecessary inspection of containers when created from an ins… Apr 6, 2016
SWARM.md Update Swarm integration guide and make it an official part of the docs Feb 19, 2016
appveyor.yml Move all build scripts to script/build Feb 25, 2016
docker-compose.spec Add 3.0 schema to docker-compose.spec Jan 4, 2017
logo.png include logo in README Sep 15, 2015
requirements-build.txt Upgrade pyinstaller. Feb 11, 2016
requirements-dev.txt Use py.test as the test runner Sep 1, 2015
requirements.txt Use docker SDK 2.0.1 Jan 9, 2017
setup.cfg enable universal wheels Jan 4, 2017
setup.py Update setup.py extra_requires Jan 10, 2017
tox.ini Merge pull request #2388 from dnephin/fix_long_lines Feb 26, 2016

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:

version: '2'

services:
  web:
    build: .
    ports:
     - "5000:5000"
    volumes:
     - .:/code
  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.