Docker Compose

Install Compose

1
2
3
4
5
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

sudo docker-compose --version

Once installed compose can build your containers in order based on a docker-compose.yml file

The command must be run relative to the above file:

1
2
3
4
5
#starts up the containers
sudo docker-compose up

#deletes the containers
sudo docker-compose rm

References