Docker Compose is a tool that allows you to define and orchestrate multi-container Docker applications. It uses a YAML file to configure the application’s containers, networks, and volumes.
Compose can be used for various purposes. Single host application deployments, automated testing, and local development are the most popular use cases for Docker Compose.
This tutorial will walk through the process of installing the latest version of Docker Compose on Debian 9. We’ll also explore the basic Docker Compose concepts and commands.
Ensure that you have met the following prerequisites before continuing with this tutorial:
The Docker Compose installation package is available in the official Debian 9 repositories but it may not always be the latest version. The recommended approach is to install Docker Compose from the Docker’s GitHub repository.
At the time of writing this article, the latest stable version of Docker Compose is version 1.23.1
. Before downloading the Compose binary visit the Compose repository release page on GitHub and check if there is a new version available for download.
/usr/local/bin
directory using the following [curl](https://linuxize.com/post/curl-command-examples/)
command:sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
docker-compose version 1.23.1, build b02f1306
In this section we will show how to use Docker Compose to manage a WordPress stack on your Debian 9 machine.
#docker #debian 9 #docker compose #yaml file #volumes #networks