×
Community Blog How to Install Docker on Ubuntu 20

How to Install Docker on Ubuntu 20

This article explains how to install Docker on Ubuntu 20 in a few straightforward steps.

Docker is a popular container technology that allows you to deploy applications and services quickly. It is widely used for application development and deployment, and it can be used in various other contexts as well.

You can install Docker on Ubuntu 20 in a few steps. Before beginning, it is important to make sure that the system is updated and that all required dependencies are installed.

This can be done by running the following commands:

sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common

Once the system is updated, the next step is adding the official Docker repository to the system. This can be done by running the following command:

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

After adding the repository, the next step is adding the repository to the system. This can be done by running the following command:

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

Once the repository has been added to the system, the next step is to install Docker. This can be done by running the following command:

sudo apt update sudo apt install -y docker-ce 

Once the installation is complete, the next step is to check if Docker is working properly. This can be done by running the following command:

sudo systemctl status docker

The output of this command should show that Docker is active and running. If the output looks something like this, the installation of Docker on Ubuntu 20 is successful:

● docker.service - Docker Application Container Engine 
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) 
Active: active (running) since Mon 2020-05-25 14:45:19 UTC; 1min 14s ago
Docs: https://docs.docker.com
Main PID: 856 (dockerd)
Tasks: 10
Memory: 42.8M
CPU: 209ms 
CGroup: /system.slice/docker.service 
        └─856 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Once the installation of Docker on Ubuntu 20 is complete, the next step is to create a simple container using this command:

docker run hello-world

If the command runs successfully, the installation of Docker on Ubuntu 20 is complete. You can start building and deploying Docker containers on your system.

Installing Docker on Ubuntu 20 is a straightforward process that should not take more than a few minutes to complete. With Docker installed on your system, you can begin leveraging container technology for application development and deployment.

0 2 0
Share on

Nick Fan

10 posts | 0 followers

You may also like

Comments

Nick Fan

10 posts | 0 followers

Related Products