ubuntu docker install

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. 

Ubuntu 20.04 on VMware Player

1. Update the Software Repository

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.

Updating the Software Repository

2. Download Tools and Dependencies

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.

downloading the dependencies

3. Add Docker's GPG Key

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 –
add docker gpg key

Make sure you copy the whole command correctly. Missing anything won’t get us the key.

4. Add the Official Docker Repository

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"
add the official docker repo

Update the package manager again.

sudo apt update

5. Install Docker on Ubuntu 20.04

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 
how to install docker on ubuntu 20.04

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.

docker is installed on ubuntu 20.04

Leave a Comment

Recent Posts

how to stop a docker container
How to Run a Docker Container
How to Push a Docker Image to a Private Repository
How to push a docker image
How to Tag a Docker Image
Software Spice
Share via
Copy link
Powered by Social Snap