On this tutorial, we will look at how to install Docker CE on Pop!_OS 20.04|20.10|21.04. Docker CE is a containerization space that is free and opensource, by using containers, it is able to create, manage and use applications. A container is a package that contains all the required dependencies and libraries needed to get an application running. With docker you are able to deploy containers on Linux machines.

Prerequisites;

  • 64-bit of Ubuntu Hirsute 21.04
  • 64-bit of Ubuntu Groovy 20.10
  • 64-bit of Ubuntu Focal 20.04 (LTS)
  • 64-bit of Ubuntu Bionic 18.04 (LTS)
  • 64-bit of Ubuntu Xenial 16.04 (LTS)

Install Docker CE on Pop!_OS 20.04|20.10|21.04

Below is a step by step process on how to install Docker CE on Pop!_OS, follow them to the end and you will successfully get Docker CE on your Pop!_OS system;

Step 1. Remove Old Version of Docker

Just in case you have any old versions of docker (dockerdocker.io, or docker-engine) on your system, you need to uninstall them, to do so, use the command below;

 sudo apt remove docker docker-engine docker.io containerd runc

The output below shows that there are no versions of docker from your system;

Step 2. Update your System

Update your cache repository using the command below;

 sudo apt update

Step 3. Install Dependency Packages

  • To install the packages required by docker CE, use the command below;
sudo apt -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
  • Import Docker GPG Key

To import the GPG Key, use the command below;

 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
 
  • Add repository using the command below;
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 

The output;

[email protected]:~$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Repository: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu groovy stable'
Description:
Archive for codename: groovy components: stable
More info: https://download.docker.com/linux/ubuntu
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Found existing deb entry in /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-groovy.list
Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-groovy.list
Found existing deb-src entry in /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-groovy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_ubuntu-groovy.list
Hit:1 https://download.docker.com/linux/ubuntu groovy InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                 
Hit:3 http://ppa.launchpad.net/libreoffice/ppa/ubuntu groovy InRelease                                                                                                                       
Hit:4 http://us.archive.ubuntu.com/ubuntu groovy InRelease                                                                                                                                   
Hit:5 http://download.virtualbox.org/virtualbox/debian focal InRelease                                                                                                                       
Hit:6 http://packages.microsoft.com/repos/edge stable InRelease                                                                                                                              
Get:7 http://us.archive.ubuntu.com/ubuntu groovy-security InRelease [110 kB]                                                                                                                 
Hit:8 http://ppa.launchpad.net/ondrej/php/ubuntu groovy InRelease                                                                                 
Hit:9 http://apt.pop-os.org/proprietary groovy InRelease                                                                                                                      
Hit:10 https://dl.winehq.org/wine-builds/ubuntu focal InRelease                                                                                                               
Hit:11 http://ppa.launchpad.net/system76/pop/ubuntu groovy InRelease                                                                                    
Hit:12 https://repo.skype.com/deb stable InRelease                                                     
Hit:13 http://us.archive.ubuntu.com/ubuntu groovy-updates InRelease
Get:14 http://us.archive.ubuntu.com/ubuntu groovy-backports InRelease [101 kB]
Fetched 211 kB in 3s (77.6 kB/s)    
Reading package lists... Done

Step 4. Install Docker CE on Pop!_OS 20.04|20.10|21.04

Once all the dependencies and repositories of docker have been added to your system, you need now to install the Docker CE itself;

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

A section output is as shown below;

Unpacking libslirp0:amd64 (4.3.1-1) ...
Selecting previously unselected package slirp4netns.
Preparing to unpack .../7-slirp4netns_1.0.1-1_amd64.deb ...
Unpacking slirp4netns (1.0.1-1) ...
Setting up docker-scan-plugin (0.8.0~ubuntu-groovy) ...
Setting up containerd.io (1.4.6-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Setting up docker-ce-cli (5:20.10.7~3-0~ubuntu-groovy) ...
Setting up libslirp0:amd64 (4.3.1-1) ...
Setting up pigz (2.4-1) ...
Setting up docker-ce-rootless-extras (5:20.10.7~3-0~ubuntu-groovy) ...
Setting up slirp4netns (1.0.1-1) ...
Setting up docker-ce (5:20.10.7~3-0~ubuntu-groovy) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Processing triggers for systemd (246.6-1ubuntu1.3pop0~1617377719~20.10~ce920ac) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for libc-bin (2.32-0ubuntu3) ...

Step 5. Check Docker version installed

Use this command below;

docker version

If you need to play around with some docker commands, use the following to check some of the switches that can be used with docker;

docker help

The usage is docker [OPTIONS] COMMAND.

Now you have managed to successfully install Docker CE on Pop!_OS, it is also important to learn how you can uninstall it so that once you do not need it anymore, you can remove it with ease.

Uninstall Docker Engine

  • To uninstall Docker Engine, CLI, and Containerd packages, use the following command;
 sudo apt purge docker-ce docker-ce-cli containerd.io
  • To delete all images, containers and volumes, use the command below;
 sudo rm -rf /var/lib/docker
 sudo rm -rf /var/lib/containerd

Other Posts;

LEAVE A REPLY

Please enter your comment!
Please enter your name here