How to Install Docker Engine on Debian 11

How to Install Docker Engine on Debian 11

Docker is a powerful and popular container platform that lets developers bundle, share, and handle applications and their requirements in separate spaces known as containers. These containers offer a steady and dependable setting for apps to operate, making sure they function smoothly across different systems, no matter the variations in the basic structure. In this article, we’ll walk you through the simple procedure of setting up Docker Engine on Debian 11. 

What is Docker Engine?

Docker streamlines application management by isolating them in “containers,” ensuring consistent operation across diverse systems. This technology simplifies application mobility and management, minimizing issues from varying system configurations. Some common uses of Docker include:

  1. Application Testing. Docker creates controlled testing environments, ensuring applications work correctly before deployment.
  2. Microservices. It simplifies managing small, independent services within larger applications, improving development and updates.
  3. Continuous Integration/Continuous Deployment (CI/CD). It speeds up development by automating building, testing, and deploying applications.
  4. Server Consolidation. It maximizes server resource use by running multiple applications on a single server without conflicts.
  5. Scalability. Docker’s container approach enables easy scaling of applications to adapt to varying user demands.

These are just a handful of use cases for Docker. Overall, Docker enhances application development, testing, and deployment by providing a reliable and efficient method for handling software and its requirements. In the following section, we’ll delve into the step-by-step installation process of Docker on Debian 11.

Installing Docker Engine on Debian 11

To install Docker on Debian 11, follow these steps:

#1 Update a Package List

Make sure your package list is up to date by opening a terminal and running the following command.

sudo apt update

#2 Install Required Packages

Install the required packages to enable apt to use HTTPS repositories and support other package types.

sudo apt install apt-transport-https ca-certificates curl software-properties-common

#3 Add Docker Repository

You can add Docker’s official GPG key and repository to your system by following these steps.

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 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

#4 Update Package List Again

Please run the update command again to ensure that the Docker repository is included.

sudo apt update

#5 Install Docker Engine

Install Docker Engine and its dependencies.

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

#6 Start and Enable Docker

Start the Docker service and enable it to start on boot. First run the command:

sudo systemctl start docker

To automatically launch alongside the operating system, include it in the startup configuration with this command.

sudo systemctl enable docker

#7 Verify Installation

To ensure that Docker is up and running, try running a basic container with a “Hello World” command.

sudo docker run hello-world

Congratulations! You have successfully installed Docker on Debian 11. Get ready to efficiently manage and run containers for your applications.

Conclusion

Looking to deploy Docker with managed Kubernetes? Gcore’s Managed Kubernetes is the perfect solution.

  • Free production-grade cluster management with a 99.9% SLA
  • Free egress traffic
  • Bare Metal support for worker nodes for outstanding latency and performance

Deploy Docker with Gcore

How to Install Docker Engine on Debian 11

Subscribe
to our newsletter

Get the latest industry trends, exclusive insights, and Gcore
updates delivered straight to your inbox.