Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 11 - Install Docker

Related Posts


Run the following script to install docker on Debian 11.

For now, this is exactly the same as the script for installing on Debian 10, I just duplicated the post for reassurance, and if anything changes, I can change the relevant post.


# Update the apt package index and install packages to allow apt to use a repository over HTTPS
sudo apt-get update

sudo apt-get install -y \
  apt-transport-https \
  ca-certificates \
  curl \
  gnupg-agent \

# Add Docker's official GPG key:
curl -fsSL | sudo apt-key add -

sudo add-apt-repository \
  "deb [arch=amd64] \
  $(lsb_release -cs) \

# Install docker  
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli -y

# Add yourself to the docker group so you can run docker commands
# without sudo
sudo adduser $USER docker

At the time of writing this post, this resulted in installing Docker version 20.10.8, build 3967b7d.


Last updated: 26th June 2023
First published: 20th August 2021