Installing Docker on Debian 10
Step 1 - Setting up the Docker repo⌗
Debian doesn’t use sudo, so instead login as root and update your system.
su
apt update
Next, install a few prerequisite packages which let apt use packages over HTTPS:
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
Then add the GPG key for the official Docker repository to your system:
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
Add the Docker repository to APT sources:
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
Next, update the package database with the Docker packages from the newly added repo:
sudo apt update
Make sure you are about to install from the Docker repo instead of the default Debian repo:
apt-cache policy docker-ce
Step 2 - Installing Docker⌗
Now that everything is setup and you are able to pull the package from the Docker repo. Install it!
apt install docker-ce
Step 3 - Running Docker as ${USER}⌗
Just add your username to the docker group.
/usr/sbin/usermod -aG docker ${USER}
For the changes to take affect, logout and back in, or type:
- ${USER}
Now confirm that your user has been added to the docker group:
id -nG
Read other posts