

Version : '3.3' services : db : image : mysql:5.7 restart : always volumes : - db_data:/var/lib/mysql environment : MYSQL_ROOT_PASSWORD : password MYSQL_DATABASE : wordpress wordpress : image : wordpress restart : always volumes :. Named docker-compose.yml inside the project directory: nano docker-compose.yml Start by creating a directory for the project and changing into it In this section we will show how to use Docker Compose to manage a WordPress stack on your Debian 9 machine. The output will look something like this: docker-compose version 1.23.1, build b02f1306 Verify the installation by typing: docker-compose -version To the Compose binary: sudo chmod +x /usr/local/bin/docker-compose When the download is complete, give executable permissions Start by downloading the Docker Compose binary into the /usr/local/bin directory using the following curlĬommand: sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Perform the following steps to install the latest version of Docker Compose on Debian 9: Before downloading the Compose binary visit the Compose repository release page on GitHubĪnd check if there is a new version available for download. The recommended approach is to install Docker Compose from the Docker’s GitHub repository.Īt the time of writing this article, the latest stable version of Docker Compose is version 1.23.1. The Docker Compose installation package is available in the official Debian 9 repositories but it may not always be the latest version. Logged in as a user with sudo privileges.Prerequisites #Įnsure that you have met the following prerequisites before continuing with this tutorial: We’ll also explore the basic Docker Compose concepts and commands. This tutorial will walk through the process of installing the latest version of Docker Compose on Debian 9. Single host application deployments, automated testing, and local development are the most popular use cases for Docker Compose. It uses a YAML file to configure the application’s containers, networks, and volumes.Ĭompose can be used for various purposes. Is a tool that allows you to define and orchestrate multi-container Docker applications.
