How to install Docker on Linux Mint 20

In this tutorial, we will show you how to install Docker on Linux Mint 20. For those of you who didn't know, Docker is an open source project that automates application deployment within the software container. The container allows the developer to package all the project resources such as libraries, dependencies, assets, etc. Docker is written in Go programming language and is developed by Dot cloud. It is basically a container engine that uses Linux kernel features such as namespaces and control groups to create containers on top of an operating system and automates the deployment of the application to the container.

This article assumes you have at least a basic knowledge of Linux, know how to use the shell, and most importantly, host your site on your own VPS. The installation is quite simple and assumes you are running under the root account, if not you may need to add 'sudo' to commands to gain root privileges. I will show you the step by step installation of Docker on a Linux Mint 20 (Ulyana).

previous requirements

  • A server running one of the following operating systems: Linux Mint 20.
  • It is recommended that you use a fresh operating system installation to avoid potential problems
  • ANDnon-root sudo useror access theroot user. We recommend acting as anon-root sudo userHowever, it can damage your system if you are not careful when acting as root.

Installing Docker on Linux Mint 20 Ulyana

Step 1. Before running the tutorial below, it is important to ensure that your system is up to date by running the followingaptcommands in terminal:

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Step 2. Installing Docker on Linux Mint 20.

  • Install Docker using Snap:

Run the following command to install Snap and Docker packages:

sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt update
sudo apt install snapd

To install Docker, simply use the following command:

sudo snap install docker
  • Install Docker from the official source:

Now we add the official Docker key to your Linux Mint system:

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

Next, add the Docker repository to Linux Mint:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"

Then install Docker CE using the following command:

sudo apt update
sudo apt install docker-ce

Once installed, a docker group will be created. Add your user to the group that will run docker commands:

sudo usermod -aG docker $USER

After that, verify the Docker installation using the following command:

sudo docker --version

Docker is used with the syntax shown below:

$ docker help

Congratulations! You have successfully installed Docker. Thank you for using this tutorial to install the latest version of Docker on Linux Mint system. For additional help or useful information, we recommend that you consultthe official Docker website.

Newsletter Updates

Enter your email address below to subscribe to our newsletter