Docker is used to create lightweight and isolated containers to run and deploy applications. Without any guesses and with full confidence, Docker is the most reputed platform in today’s IT era. Docker is suitable for businesses of all sizes. The startups, mid-size companies, and enterprise-level organizations run Docker containers to power their applications. Previously, we talked about installing Docker on Ubuntu 18.04. In this tutorial, we will install Docker on Ubuntu 20.04.
There are no such differences between the installation process of Docker Engine. I have downloaded both images of Ubuntu 18.04 and 20.04 to check and see how the installation goes. For me, it’s just a change of Ubuntu flavor, the rest of the drill is almost the same.
Let’s see how to install Docker on Ubuntu 20.04.
I hope that you’ve enabled virtualization on your Windows 10 computer, installed VMware Player, and running Ubuntu on it. That’s the beauty of VMware Workstation, you can have multiple operating systems to work and learn with. Additionally, the process of booting up a VM is the same, you just need to download the relevant image.
Ubuntu 20.04 is classic, I have this brand new installation running on the VMware Player.
All right, let’s update the system in the first place. Get inside the VM and open the terminal. Run the following command:
sudo apt update
It might take a little time to complete the updates.
This step is important according to the security point of view. It is recommended to transfer the data and files using apt-transport-https to keep the environment secure.
sudo apt install apt-transport-https ca-certificates curl software-properties-common
I have already installed the above tools and software packages on the VM.
GPG is an excellent method to ensure secure communication between two parties. It protects the package against tampering. GPG relies on a security concept known as public-key encryption. When you add a key with apt-key add, you trust that key to authenticate software. More importantly, this means that you will never get a modified or malicious package.
Add the key with the following command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
Make sure you copy the whole command correctly. Missing anything won’t get us the key.
We are going to install Docker’s stable release from its official repo. Therefore, we need to add that repository to our system.
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Update the package manager again.
sudo apt update
Finally, we are ready to install Docker Community Edition [docker-ce] on our Ubuntu virtual machine. We will install the latest version of Docker from its official repository with the help of the following simple command:
sudo apt install docker-ce
It’s around 504 MB download. Therefore, depending on the internet connection speed, it may take some time.
Congratulations! We have installed Docker on Ubuntu 20.04.