How to Install Docker on Linux Mint 22: A Step-by-Step Guide

Your step-by-step guide to effortlessly install Docker on Linux Mint 22. Simple, practical steps tailored for beginners and experts alike.

Linux Mint 22, with its robust Ubuntu 24.04 LTS base and user-friendly interface, makes an excellent platform for running Docker. This leading containerization technology allows you to package and distribute applications consistently across environments.

This guide will walk you through every step necessary to quickly get Docker up and running on your Mint 22 system. We cover everything in a structured, easy-to-follow format. So, let’s get started.

Installing Docker on Linux Mint 22

You can install Docker on your Linux Mint 22 in several ways. For example, it is available in its official repositories, where users can easily install it with a single APT command. However, one disadvantage to this approach is that the version available is not always the most recent.

For this reason, this guide will show you how to install Docker on Linux Mint 22 from the official Docker repository so you always get the latest version.

The best part? It will automatically receive all future software updates as they become available, along with the other regular ones for your Mint 22 system, thus ensuring you always have the latest and greatest.

Step 1: Install Prerequisites

First, run the two commands below to update the package index and install the prerequisite necessary to add and use a new HTTPS repository.

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupgCode language: Bash (bash)

Once operations are completed, you can move to the next section, where weโ€™ll add the Dockerโ€™s repo GPG key and repo itself to our Linux Mint 22 system.

Step 2: Add Dockerโ€™s Official GPG Key

Next, import the Docker GPG repository key to your Mint system. This security feature ensures that the software youโ€™re installing is authentic.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpgCode language: JavaScript (javascript)
Add Dockerโ€™s repo GPG key.
Add Dockerโ€™s repo GPG key.

Notice that the command produces no output.

Step 3: Add Docker Repo to Linux Mint 22

After importing the GPG keys, weโ€™ll add the official Docker repository to our Linux Mint 22 system. Thus, when a new version is released, the update package will be made available with the rest of your systemโ€™s regular updates.

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu noble stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullCode language: Bash (bash)
Add the official Docker repository to Linux Mint 22.
Add the official Docker repository to Linux Mint 22.

As with the previous command, its execution produces no output. Next, refresh the package list.

sudo apt updateCode language: Bash (bash)
Update the package base.
Update the package base.

As you can see, the new Docker repository is now available to our Mint system and ready to be used.

Step 4: Install Docker on Linux Mint 22

Finally, run the below command to install the latest up-to-date Docker release on Linux Mint 22.

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginCode language: Bash (bash)
Install Docker on Linux Mint 22.
Install Docker on Linux Mint 22.

This installs the following Docker components:

  • docker-ce: The Docker engine itself.
  • docker-ce-cli: A command line tool that lets you talk to the Docker daemon.
  • containerd.io: A container runtime that manages the containerโ€™s lifecycle.
  • docker-buildx-plugin: This extension for Docker enhances the capabilities of building images, mainly focusing on multi-platform builds.
  • docker-compose-plugin: A configuration management plugin that helps manage multi-container Docker applications using a single YAML file.

Thatโ€™s all! Docker should now be installed, service enabled, and set to start automatically on boot. In addition, check its status using the command below to confirm that everything is as expected:

sudo systemctl is-active dockerCode language: Bash (bash)
Check the status of the Docker service.
Check the status of the Docker service.

Step 5: Verify Installation

This is the moment of truth. Letโ€™s check if our new Docker installation works correctly by running a simple containerized application called โ€œhello-world.โ€

sudo docker run hello-worldCode language: Bash (bash)
Docker successfully installed, up & running on Linux Mint 22.
Docker successfully installed, up & running on Linux Mint 22.

Congratulations! As we can see, everything works properly.

Enabling Non-root Users to Run Docker Commands

We have successfully installed Docker on the Arch system so far. However, only root and users with sudo privileges can execute Docker commands by default.

In other words, if you attempt to run the docker command without prefixing it with sudo, youโ€™ll get an error message like this:

Docker permission denied.
Docker permission denied.

But there is no room for worries. To run Docker commands as a non-root user, you must first add your user to the โ€œdockerโ€ group. It is a simple task. To do that, type in the following:

sudo usermod -aG docker ${USER}Code language: Bash (bash)

In the above command, โ€œ${USER}โ€ is a system environment variable that contains your username. Then, run the following command to activate the changes to the group:

newgrp dockerCode language: Bash (bash)

You can then execute docker commands without prefixing them with sudo.

Run the docker command as a regular user.
Run the docker command as a regular user.

Remember that this solution will work only for your current terminal session. In other words, if you close the terminal, you will either have to execute the newgrp command above again or prefix docker commands with sudo. To make this change last permanently, just restart your Mint system.

Conclusion

Installing Docker on Linux Mint 22 is straightforward with our guide and allows you to benefit from the latest features and improvements in Docker technology. Youโ€™re now ready to containerize applications and fully take advantage of Dockerโ€™s efficiencies and portability.

To learn more about Docker, check out its official documentation. Additionally, we recommend our detailed guide to expanding your skills with Docker and learning how to run and manage multi-container applications using Docker Compose.

If you encounter any issues or have questions, let me know in the comments section below. Thank you for following this tutorial, and happy Dockerizing!

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%