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
1
| for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
|
Add Docker repo to apt index
- Allow
apt
to use a repository over HTTPS:
1
2
| sudo apt update
sudo apt install ca-certificates curl gnupg
|
- Add Docker GPG key:
1
2
3
| sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
- Add the repository to the apt index:
1
2
3
4
| echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$UBUNTU_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
- Update apt to get new packages from the new Docker repo:
Install Docker Engine
- Download latest image fom
apt
store using the following command:
1
| sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
Test Docker Engine
- Start a simple Hello World container
1
| sudo docker run hello-world
|
- Verify Docker and Compose versions
1
2
3
4
5
6
7
| 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