How to Install Docker Engine on Linux Mint

Docker is a platform that allows developers to easily create, deploy, and run applications in containers. Containers are a way to package software so that it can run consistently across different environments, like your computer, a server, or even the cloud.

This guide will help you install with Docker Engine and Docker Compose on Linux Mint. Start building Docker containers and Docker compose stacks on Linux Mint right now.

Uninstall old versions

for pkg in docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done

Add Docker repo to apt index

  1. Allow apt to use a repository over HTTPS:
sudo apt update
sudo apt install ca-certificates curl gnupg
  1. Add Docker GPG key:
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
  1. Add the repositry to the apt index:
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] \
  "$(. /etc/os-release && echo "$UBUNTU_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  1. Update apt to get new packages from the new Docker repo:
sudo apt-get update

Install Docker Engine

sudo apt install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin

Test Docker Engine

sudo docker run hello-world
sudo docker --version

Docker version 20.10.25, build 20.10.25-0ubuntu1~22.04.1

sudo docker compose version

Docker Compose version v2.20.2

Further reads