Cantech Knowledge Base

Your Go-To Hosting Resource

How to Install Docker CE on Debian 11?

If you are using Debian 11 and want an easier way to manage applications, then Docker could be your solution. Docker is an open-source application and very powerful, allowing you to easily package your applications and everything needed to run them into containers. The containers help keep them behaving the same way, no matter your system.

In this tutorial, I will walk you through the process of installing Docker CE (Community Edition) on your Debian 11 installation.

Why Docker?

To begin with, let’s just take a look at why Docker is useful!

Portable: The main feature of Docker is that it can run anywhere, no matter the differences in systems. If it runs in a container, it runs everywhere.
Lightweight and Resource Efficient: Unlike virtual machines, Docker is lightweight when it comes to Docker resources. Using containers is fast, streamlined, and gets results.
Scalable: If you start to get too much traffic, just run more containers with a couple of commands. Scaling is just that easy.

What is Docker CE?

Docker CE refers to the Docker Community Edition. It is a free and open-source version of Docker, ideal for individual developers, small teams, and open-source projects.

Why Debian 11 ?

Debian 11 is a stable and trusted Linux distribution well known for system package management and security. It is widely used as a standard OS for servers and development environments. Let’s explore some of the reasons why Debian 11 is the ultimate choice!

  • Lightweight and provides great performance.
  • Provides great community support.
  • Offers advanced security and is stable, thus beneficial for running containers in production environments.

Comprehensive Guide to Install Docker CE on Debian 11

Let’s explore some of the basic steps to install Docker CE on Debian 11!

Step 1: Install Dependencies

Install the required dependencies for Docker to run.

$ sudo apt install apt-transport-https lsb-release ca-certificates curl gnupg -y

Step 2: Install the Docker Repository

Download the GPG key and add it.

$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Next, add your downloaded repository.

$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Now, you will then be prompted to update the system.

$ sudo apt update

Step 3: Install the Docker Engine

Install docker engine.

$ sudo apt -y install docker-ce docker-ce-cli containerd.io

Check if docker was installed and its associated version.

$ sudo docker version

Enable the docker service to start on system boot.

$ sudo systemctl enable docker

Check the status of the docker service.

$ sudo systemctl status docker

Step 4: Verify the Docker Installation

Run the following command to test the docker installation.

$ sudo docker run -d -p 80:80 docker/getting-started

That’s it!

Final Wrap Up

The installation of Docker CE on Debian 11 is beneficial because it provides a stable management platform for your containerized applications. The system can deploy applications more quickly, scale them instantly and keep existing state across environments. Leverage the steps mentioned to install Docker on your Debian 11 system with ease, and utilize the full potential of containerization technology.

FAQs

Is it possible to use Docker CE for free?
Yes! Docker Community Edition is a free open-source platform, and best suited for individual developers, small teams, and many more.

Explain the difference between Docker CE and Docker EE.
Docker CE is the free and community-supported version of Docker. Docker EE (Enterprise Edition) is the best-suited for enterprise-scale business that comes with advanced features and functionalities.

How can I uninstall Docker?
To uninstall Docker just run:

sudo apt remove docker-ce docker-ce-cli containerd.io

How can I check if Docker is running?
You can use this command to check if Docker is running:

sudo systemctl status docker

If it is not running, you need to run:

sudo systemctl start docker
June 5, 2025