


How to Install Docker Compose on Ubuntu 20.04 LTSĪlso Read: Docker CMD vs ENTRYPOINT: Understanding the difference and Usage Step 1: PrerequisitesĪ) You should have a running Ubuntu 20.04 LTS Server.ī) You should have sudo or root access to run privileged commands.Ĭ) You should have apt or apt-get utility available in your System.ĭ) You should also have gpg, curl and tee utility installed in your System. Here we will see the steps to install docker compose on Ubuntu 20.04 LTS. It can be easily installed in almost all kind of environments. It uses a YAML config file called docker-compose.yml to create and run multiple containers as a single service. It is known to be the orchestrating and launching tool for multi container applications. So to make life easier it is always recommended to use a completely free and open source tool called Docker Compose. Further more, with the increase in the number of application containers, it becomes almost impossible to keep track of and manage all those containers. If you are using multiple containers based application then you might be aware of the pain of writing and managing tons of code in multiple docker files to create and deploy that application. You should now be able to drop sudo from Docker commands.In this article, I will take you through step by step guide to install docker compose on Ubuntu 20.04 LTS. Alternatively, run the newgrp docker command to immediately login to the updated group. Once you’re in the group, logout and login again. Adding yourself to the docker group will let you use Docker without sudo. This can get tedious if you’re using Docker often. You must usually prefix Docker commands with sudo. Install Docker: sudo yum install docker-ce docker-ce-cli containerd.io Using Docker Without Sudo Install Docker: sudo dnf install docker-ce docker-ce-cli containerd.io CentOSĪdd Docker’s package repository: sudo yum -y install yum-utils Now you can install Docker: sudo apt-get install docker-ce docker-ce-cli containerd.io FedoraĪdd Docker’s package repository: sudo dnf -y install dnf-plugins-core

Next, add Docker’s repository GPG key: curl -fsSL | sudo gpg -dearmor -o /usr/share/keyrings/docker-archive-keyring.gpgĪdd the repository to your sources and update your package lists: echo "deb $(lsb_release -cs) stable" | sudo tee /etc/apt//docker.list > /dev/null Sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release Begin by adding dependencies needed by the installation process: sudo apt-get update
