2015-06-07 22:59:58 +02:00
|
|
|
<!--[metadata]>
|
|
|
|
+++
|
|
|
|
title = "Overview of Docker Compose"
|
|
|
|
description = "Introduction and Overview of Compose"
|
|
|
|
keywords = ["documentation, docs, docker, compose, orchestration, containers"]
|
|
|
|
[menu.main]
|
|
|
|
parent="smn_workw_compose"
|
|
|
|
+++
|
|
|
|
<![end-metadata]-->
|
2014-01-27 12:42:38 +01:00
|
|
|
|
2015-01-19 06:46:23 +01:00
|
|
|
|
2015-06-07 22:59:58 +02:00
|
|
|
# Overview of Docker Compose
|
2015-04-07 01:47:07 +02:00
|
|
|
|
2015-05-26 16:41:59 +02:00
|
|
|
Compose is a tool for defining and running multi-container applications with
|
|
|
|
Docker. With Compose, you define a multi-container application in a single
|
|
|
|
file, then spin your application up in a single command which does everything
|
|
|
|
that needs to be done to get it running.
|
2015-01-30 03:21:49 +01:00
|
|
|
|
2015-02-16 20:21:17 +01:00
|
|
|
Compose is great for development environments, staging servers, and CI. We don't
|
|
|
|
recommend that you use it in production yet.
|
2015-01-30 03:21:49 +01:00
|
|
|
|
|
|
|
Using Compose is basically a three-step process.
|
2015-01-30 12:27:57 +01:00
|
|
|
|
2015-03-27 00:35:53 +01:00
|
|
|
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
|
2015-01-30 12:27:57 +01:00
|
|
|
they can be run together in an isolated environment:
|
2015-03-27 00:35:53 +01:00
|
|
|
3. Lastly, run `docker-compose up` and Compose will start and run your entire app.
|
|
|
|
|
|
|
|
A `docker-compose.yml` looks like this:
|
2014-01-27 12:42:38 +01:00
|
|
|
|
2015-06-21 21:37:20 +02:00
|
|
|
web:
|
|
|
|
build: .
|
|
|
|
ports:
|
|
|
|
- "5000:5000"
|
|
|
|
volumes:
|
|
|
|
- .:/code
|
|
|
|
links:
|
|
|
|
- redis
|
|
|
|
redis:
|
|
|
|
image: redis
|
2014-01-27 12:42:38 +01:00
|
|
|
|
2015-02-16 20:21:17 +01:00
|
|
|
Compose has commands for managing the whole lifecycle of your application:
|
2014-01-27 12:42:38 +01:00
|
|
|
|
2015-01-30 03:21:49 +01:00
|
|
|
* Start, stop and rebuild services
|
|
|
|
* View the status of running services
|
2015-02-16 20:21:17 +01:00
|
|
|
* Stream the log output of running services
|
|
|
|
* Run a one-off command on a service
|
2014-01-27 12:42:38 +01:00
|
|
|
|
2015-02-25 15:09:30 +01:00
|
|
|
## Compose documentation
|
|
|
|
|
|
|
|
- [Installing Compose](install.md)
|
2015-10-09 16:49:41 +02:00
|
|
|
- [Getting Started](gettingstarted.md)
|
2015-05-12 13:44:43 +02:00
|
|
|
- [Get started with Django](django.md)
|
|
|
|
- [Get started with Rails](rails.md)
|
2015-09-16 17:01:43 +02:00
|
|
|
- [Get started with WordPress](wordpress.md)
|
2015-10-13 13:01:19 +02:00
|
|
|
- [Command line reference](./reference/index.md)
|
2015-10-13 21:23:27 +02:00
|
|
|
- [Compose file reference](compose-file.md)
|
2014-01-27 12:42:38 +01:00
|
|
|
|
2015-05-26 16:41:59 +02:00
|
|
|
|
2015-04-07 01:47:07 +02:00
|
|
|
## Release Notes
|
|
|
|
|
2015-09-04 18:01:44 +02:00
|
|
|
To see a detailed list of changes for past and current releases of Docker
|
2015-09-03 06:06:25 +02:00
|
|
|
Compose, please refer to the [CHANGELOG](https://github.com/docker/compose/blob/master/CHANGELOG.md).
|
2015-04-10 01:23:25 +02:00
|
|
|
|
|
|
|
## Getting help
|
|
|
|
|
2015-10-09 01:09:01 +02:00
|
|
|
Docker Compose is under active development. If you need help, would like to
|
|
|
|
contribute, or simply want to talk about the project with like-minded
|
|
|
|
individuals, we have a number of open channels for communication.
|
2015-04-10 01:23:25 +02:00
|
|
|
|
|
|
|
* To report bugs or file feature requests: please use the [issue tracker on Github](https://github.com/docker/compose/issues).
|
|
|
|
|
2015-10-09 01:09:01 +02:00
|
|
|
* To talk about the project with people in real time: please join the
|
|
|
|
`#docker-compose` channel on freenode IRC.
|
2015-04-10 01:23:25 +02:00
|
|
|
|
|
|
|
* To contribute code or documentation changes: please submit a [pull request on Github](https://github.com/docker/compose/pulls).
|
|
|
|
|
|
|
|
For more information and resources, please visit the [Getting Help project page](https://docs.docker.com/project/get-help/).
|