Define and run multi-container applications with Docker
Switch branches/tags
Clone or download
shin- Merge pull request #6184 from docker/fix-zsh-completion
Update zsh completion with new options, and ensure service names are properly retrieved
Latest commit a5f42ae Sep 14, 2018
Permalink
Failed to load latest commit information.
.circleci Bump Python SDK -> 3.5.0 Aug 10, 2018
bin Use newer versions of pre-commit hooks Aug 21, 2017
compose Fix some typo Sep 7, 2018
contrib Update zsh completion with new options, and ensure service names are … Sep 12, 2018
docs missing "is" Mar 23, 2018
experimental Remove doc on experimental networking support Jul 25, 2016
project Document new release process Apr 27, 2018
script Handle userns security Sep 12, 2018
tests Merge pull request #6100 from docker/5960-parallel-pull-progress Aug 24, 2018
.dockerignore Some more test adjustments for Swarm support Jul 26, 2017
.gitignore Add --hash opt for config command Aug 7, 2018
.pre-commit-config.yaml Use newer versions of pre-commit hooks Aug 21, 2017
CHANGELOG.md Fix typos in CHANGELOG Sep 7, 2018
CHANGES.md Rename CHANGES.md to CHANGELOG.md Aug 14, 2015
CONTRIBUTING.md Keep CONTRIBUTING.md information up to date Feb 12, 2018
Dockerfile Remove obsolete code that slows down test execution Feb 2, 2018
Dockerfile.armhf Test and build on 3.6 (replaces 3.4) ; dist 3.6-compiled binaries Feb 2, 2018
Dockerfile.run Fix broken url Aug 17, 2018
Dockerfile.s390x Use slim alpine instead of bulky debian Oct 18, 2017
Jenkinsfile Bump Python SDK -> 3.5.0 Aug 10, 2018
LICENSE Docker, Inc. Jul 24, 2014
MAINTAINERS Fix indentation + HOF comment Mar 15, 2018
MANIFEST.in Add the git sha to version output Dec 3, 2015
README.md Improve spelling in the README.md Feb 7, 2018
SWARM.md Update Swarm integration guide and make it an official part of the docs Feb 23, 2016
appveyor.yml Bump Python SDK -> 3.5.0 Aug 10, 2018
docker-compose.spec Add composefile v3.7 May 29, 2018
logo.png include logo in README Sep 15, 2015
requirements-build.txt Test and build on 3.6 (replaces 3.4) ; dist 3.6-compiled binaries Feb 2, 2018
requirements-dev.txt Bump Python SDK -> 3.5.0 Aug 10, 2018
requirements.txt Bump Python SDK -> 3.5.0 Aug 10, 2018
setup.cfg enable universal wheels Jan 10, 2017
setup.py Bump Python SDK -> 3.5.0 Aug 10, 2018
tox.ini Bump Python SDK -> 3.5.0 Aug 10, 2018

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.