Installing Docker in Linux Mint
If you are using Linux Mint and following the docker’s official guide to install docker then you might get an error while trying to add the docker repository. Here is how you solve it.
Update the apt package index
sudo apt-get update
Install packages to allow apt to use a repository over HTTPS
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
sudo apt-key fingerprint 0EBFCD88
pub 4096R/0EBFCD88 20sudo apt-get install docker-ce docker-ce-cli containerd.io17-02-22
Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid Docker Release (CE deb) <[email protected]>
sub 4096R/F273FCD8 2017-02-22
This is where we have to do things manually.
Add the docker repository manually to the sources
sudo vim /etc/apt/sources.list.d/additional-repositories.list
Add the following line to the file
For Linux Mint 19+
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
For Linux Mint 20+
deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
Update the apt
sudo apt-get update
Install the latest version of Docker Engine - Community and containerd, or go to the next step to install a specific version:
Latest Version
sudo apt-get install docker-ce docker-ce-cli containerd.io
Specific Version
a. List the versions available in your repo:
apt-cache madison docker-ce
b. Install a specific version using the version string from the second column, for example, 5:18.09.1~3-0~debian-stretch
sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
Manage Docker as non-root user
1 Create the docker
group
sudo groupadd docker
2 Add your user to the docker group.
sudo usermod -aG docker $USER
3 Activate the changes using the following command or logout
newgrp docker
4 Start docker service on boot
sudo systemctl enable docker
Verify that Docker is installed properly
sudo docker run hello-world
Taken from
Get Docker Engine - Community for Debian
Post-installation steps for Linux
Docker installation on Linux Mint 19.2 doesn’t work