Installing Docker in Ubuntu 20.04

Instructions for installing Docker Community Edition (CE) in Ubuntu 20.04

Docker is a software for automating the deployment and management of applications in an operating system-level virtualization environment. It allows you to package an application with all its environment and dependencies into a container that can be ported to any Linux system with kernel cgroups support and provides a container management environment

file

Before installing Docker, update the existing Ubuntu package list: ``.shell sudo apt update

Next, let's install the necessary packages that allow **apt** to use packages over HTTPS:
``.shell
sudo apt install apt-transport-https ca-certificates curl software-properties-common

Add the GPG key of the official Docker repository to your system: ``.shell curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add Docker repository to the list of APT package sources:
``.shell
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

Then update the packages database with information about Docker packages from the newly added repository: ``.shell sudo apt update

To make sure to install Docker from the Docker repository and not from the default Ubuntu repository, run the command:
``.shell
apt-cache policy docker-ce

``.shell root@kvmde68-19464:~# apt-cache policy docker-ce docker-ce: Installed: (none) Candidate: 5:19.03.11~3-0~ubuntu-focal Version table: 5:19.03.11~3-0~ubuntu-focal 500 500 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages 5:19.03.10~3-0~ubuntu-focal 500 500 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages 5:19.03.9~3-0~ubuntu-focal 500 500 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages

Note that docker-ce is not installed, but is a candidate to install from the Docker repository for Ubuntu 20.04 (focal version).

Installing Docker:
``.shell
sudo apt install docker-ce

Docker is installed, the process will start at system startup.

Let's check that the process is running: ``.shell sudo systemctl status docker


``.shell
root@kvmde68-19464:~# sudo systemctl status docker
Docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2020-06-22 16:19:04 MSK; 18s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 3289 (dockerd)
      Tasks: 8
     Memory: 36.3M
     CGroup: /system.slice/docker.service
             └─3289 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Jun 22 16:19:03 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:03.447245632+03&gt
Jun 22 16:19:03 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:03.447627302+03&gt
Jun 22 16:19:03 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:03.448236842+03&gt
Jun 22 16:19:03 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:03.449654437+03&gt
Jun 22 16:19:03 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:03.896983152+03&gt
Jun 22 16:19:04 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:04.107198555+03&gt
Jun 22 16:19:04 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:04.244408196+03&gt
Jun 22 16:19:04 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:04.245672224+03&gt
Jun 22 16:19:04 kvmde68-19464.fornex.org systemd[1]: Started Docker Application Container Engi&gt
Jun 22 16:19:04 kvmde68-19464.fornex.org dockerd[3289]: time="2020-06-22T16:19:04.396727868+03

When we install Docker, we get not only the Docker service, but also the docker command line utility or the Docker client.


You can also use our One-Click-Apps for one-click installation to install Docker To do so, select the required VPS plan and select Apps → Docker, to install.

file


If you have any configuration difficulties or have additional questions, you can always contact our support team via ticket system.

Need help?Our engineers will help you free of charge with any question in minutesContact us