Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 10 - Install Docker

Related Posts

Steps

Run the following script to install docker on Debian 10

#!/bin/bash

# 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 \
  software-properties-common

# Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

sudo add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/debian \
  $(lsb_release -cs) \
  stable"

# Install docker  
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io -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 19.03.8, build afacb8b7f0.

References

Last updated: 11th February 2022
First published: 11th May 2020