Docker Tutorials

How to Install Docker on Ubuntu 20.04

In this tutorial you will be shown how to install Docker onto Ubuntu 20.04. Docker is an open source platform that simplifies the process of building, running, managing and distributing applications. It does this by virtualizing the operating system of the computer on which it is installed and running.

 

 

Lets Get Started!

Prerequisites

  • Create a Ubuntu 20.04 VPS server on Linode. The $5 plan will be fine for this tutorial. If your planning on deploying many containers consider using a larger plan.

Docker

Lets SSH into Ubuntu 20.04 and perform some updates.

  1. To SSH into the server we will be using Putty. Download and install Putty.
  2. Open up putty and type in the IPv4 address of your server and click open.
  3. Log into your Ubuntu 20.04 server with the username and password.
  4.  started with making sure we have the latest updates installed.
sudo apt update
sudo apt upgrade

5. Give it a few minutes for the updates to install and afterwards run the following command to reboot.

reboot

Lets Install Docker on Ubuntu 20.04

  1. Once the server is rebooted and your reconnected into the server using SSH we will now get started with running the following commands.
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent

2. Now we will have to import the GPG key of the Docker repository:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

3. Followed by adding the docker repository to the APT sources on your system:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

4. Run the update command to update the repository.

sudo apt update

5. Lets make sure we install docker from its repository instead of the Ubuntu repository:

apt-cache policy docker-ce

6. once the previous step completed successfully lets install Docker community edition. 

sudo apt install docker-ce

7. If we run the following command, this would tell us if we have properly installed Docker on Ubuntu 20.04

sudo systemctl status docker

If you get message Active (running) we have successfully installed docker.

If you have any questions about the configuration or run into any issues please feel free to contact me. If you want to be notified of when I create a new post you can subscribe to my blog alert. 

Leave a Comment

Stay Informed

Receive instant notifications when new content is released.