Docker On Debian

2/13/2022by admin

Run container virtual machine by installing Docker CE on Debian 10 or 11 Bullseye Linux using the guide given here in this article…

Docker is a container-based application framework, which wraps a specific application with all its dependencies in a container. Docker containers can easily to ship to the remote location on start there without making entire application setup. This tutorial will help you to install Docker on Debian 10 Buster Linux distribution. Step 1 – Prerequisites First. Method 1: Install Docker Using the Repository on Debian 10 The best option for most Debian 10 users will be to install Docker from its official repositories. To do so, follow the steps outlined below. Let's run a container using the latest image of Debian: docker run -it debian. Output: [email protected]:# docker run -it debian [email protected]:/# Now you can run any command inside the container. For example, let's update the package database inside the container. Debian 11 / Debian 10. We need to install Docker engine on all the hosts, manager and worker nodes. Install dependency packages on the hosts: sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common. Docker on Debian 10 To set up Docker, you will need to prepare the system for installation. Deleting older versions of Docker packages and downloading the required dependencies speeds up the process.

Debian 11 is the latest long-term supported release from the developers of this Linux. However, if you are using it and don’t want to install any Virtual machine software such as Virtual Box, then Docker will be the best and lightweight platform to quickly create containers using various Linux OS and other App images.

What do you need to perform this tutorial:

  • Internet connection
  • Debian 11 Bullseye Linux
  • A user with sudo rights
  • Access to the command terminal


  • Docker Installation on Debian 11 Bullseye

Docker Installation on Debian 11 Bullseye

The steps given here will also work for earlier versions of this Linux such as Debian 10 buster and other Linux based on it.


1. Install Dependencies

Few things should be there on the Debian system before installing Docker. So, first, run the system update command and then the next one to get the additional packages.


2. Add Docker GPG Key

Next, add the GPG key that is necessary without it the system will generate an error after adding the repository. It is because Debian needs to verify that whatever packages we are getting to install the Docker platform are from a genuine source without any alteration using this key.

3. Add Docker Repository on Debian 11

After adding the GPG key it’s time to manually create a repository file that holds the official Docker repo link to let the system download and install packages available through it.

Enter the whole single command in your terminal and hit the Enter key.

4. Run system update

To let the system recognize the newly added repository, run the system update command once:

5. Command to install Docker Engine on Debian 11 Bullseye

Finally, here is the command to install Docker Engine community edition, containerd, and the command line.

6. Start its service, if not

Once the installation is completed you can check the status of the docker service whether it’s running normally without generating errors.

First Check status:

Docker On Debian

If it is not running then, start it:

Whereas to stop, if required, you can run:

To check the version:

7. Run Docker without Sudo

By default our current user is not the part of Docker group, hence every time to run its command we have to use sudo with it. And that could be annoying for some users, hence to remove that run the below command to make your current user the part of Docker group.

After that execute this command. It will ask for your current user password.

Basically, after adding users to a group we have to log out and log in again to the system, but we don’t need to do that lengthy process, just use the above-given command and you are done.

8. Test your Container platform

As of now we have installed and configured all the key things required to run the Docker platform on Debian 11 Bullseye. Now, let’s test whether it is working or not.

Docker On Debian Wsl

Run docker on debian

Let’s install Ubuntu Image on docker

To run

Uninstall and Remove Docker (optional)

After some time, if you don’t require this container platform on your system, simply remove it.

Installing Docker On Debian

Well, the above command will remove the platform and its components but not the downloaded app images, configuration files, and containers, they will remain there. To remove them as well, run:

Comments are closed.