You have to ensure they communicate, start and shut down at the same time. Thanks to a tool called Docker Compose, this becomes an easy task. Docker Compose allows developers to run multi-container Docker applications using rules defined in a YAML file. The YAML file contains definitions for the application services and how they can share data volumes and networks. Once you have defined the services, you can fire up all of them with a single command. In this tutorial, we will show you how to install, configure, and get started with Docker Compose on Ubuntu 20.04. PrerequisitesĪs this is a hands-on tutorial, you should have an installation of Ubuntu 20.04 as your initial operating environment. You should also have a non-root user with sudo privileges. Here is a step-by-step tutorial to help you set up your Ubuntu server. Follow this tutorial to configure your sudoers file. Please refer to this tutorial on how to install and operate Docker on Ubuntu 18.04.
HOW TO INSTALL CURL IN UBUNTU 20.04 HOW TO We will be downloading the latest stable version of Docker Compose from its official GitHub repository. You can find out the latest version from the releases page, at the time of writing this tutorial, the latest version is 1.28.5.įirst, log in to your Ubuntu server with the non-root sudo user and enter the following command. This makes it globally accessible as docker-compose: It downloads the latest release (1.28.5) and saves the executable in the /usr/local/bin/docker-compose directory. The docker-compose.yml file begins with the version number that tells Docker Compose which configuration version we are using. Please follow this link to learn more about Docker Compose versioning.Īfter the version number, we have the services block that contains the services that make up the environment. In this tutorial, we have only specified a single service called webserver. The webserver service will use the nginx:alpine image.
HOW TO INSTALL CURL IN UBUNTU 20.04 HOW TO.