Define and run multi-container applications with Docker
Go to file
Aanand Prasad 53cc99a822 Merge pull request #2513 from punkstar/detect-tty
Only allocate a tty if we detect one
2015-12-08 15:26:46 +00:00
bin
compose Add docker-compose config subcommand. 2015-12-07 18:51:01 -08:00
contrib/completion Remove migrate-to-labels. 2015-11-27 12:04:45 -05:00
docs Merge pull request #2467 from dnephin/remove_migrate_to_labels 2015-12-07 14:31:23 +00:00
experimental
project Merge pull request #2276 from dnephin/update_networking_docs 2015-10-29 15:19:02 +00:00
script Merge pull request #2513 from punkstar/detect-tty 2015-12-08 15:26:46 +00:00
tests Add docker-compose config subcommand. 2015-12-07 18:51:01 -08:00
.dockerignore
.gitignore Add the git sha to version output 2015-11-18 13:21:14 -05:00
.pre-commit-config.yaml
.travis.yml Fixing matrix include so `os: linux` goes to trusty 2015-11-20 16:07:37 -08:00
CHANGELOG.md Cherry-pick release notes for 1.5.2 2015-12-04 10:26:20 -08:00
CHANGES.md
CONTRIBUTING.md
Dockerfile Fix jenkins CI by using an older docker version to match the host. 2015-11-04 15:33:37 -05:00
Dockerfile.run Add the git sha to version output 2015-11-18 13:21:14 -05:00
LICENSE
MAINTAINERS update maintainers file for parsing 2015-12-04 16:52:29 +01:00
MANIFEST.in Add the git sha to version output 2015-11-18 13:21:14 -05:00
README.md Fix use case link in readme. 2015-11-19 14:53:28 -05:00
ROADMAP.md
SWARM.md
appveyor.yml
docker-compose.spec Add the git sha to version output 2015-11-18 13:21:14 -05:00
logo.png
requirements-build.txt Upgrade pyinstaller to 3.0 2015-10-23 13:34:49 -04:00
requirements-dev.txt
requirements.txt Fix texttable dep. 0.8.2 was removed from pypi. 2015-11-17 18:36:58 -05:00
setup.py Include additional classifiers 2015-10-26 17:08:45 +00:00
tox.ini Refactor parallel_execute. 2015-11-20 17:09:51 -05:00

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.