Managing multiple containers
In the first part of this chapter, we covered how to use Docker to run containers and build images. If you've mastered these fundamentals, you are ready to jump into high-level concepts and more complete tasks. The last part of this chapter will introduce you to Docker compose which is a tool for defining, launching, and managing services running in Docker containers.
Compose lets you stop focusing on single containers and instead describe full environments and service component interactions using a simple syntax contained in a YAML file (http://yaml.org/) and managed with the Command Line program Docker-compose.
Using Docker compose
We will first install docker compose which is available on GitHub. At the time of writing, the latest stable build is 1.6.2, and so the following command will download and install it:
curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
Assign...