How to install docker on Debian 10 (Buster)

We learn how to install latest Docker Community Edition version on Debian 10, using apt , stable repository and x86_64/amd64 architecture

Installation

  • To be sure that you don’t have problems with installation , do a check for old containers packages:
sudo apt-get remove docker docker-engine docker.io containerd runc
  • Update apt package index, installed needed programs, add Docker’s Official GPG key and setup the stable repository:
 sudo apt-get update

 sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

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 the docker engine:
  sudo apt-get update
  sudo apt-get install docker-ce docker-ce-cli containerd.io