DEBIAN || Install DOCKER
-
Set up the repository
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 \ ca-certificates \ curl \ gnupg \ lsb-releaseAdd Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpgUse the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullInstall Docker Engine
This procedure works for Debian on x86_64 / amd64, armhf, arm64, and Raspbian.Update the apt package index, and install the latest version of Docker Engine, containerd, and Docker Compose, or go to the next step to install a specific version:
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-pluginVerify that Docker Engine is installed correctly by running the hello-world image.
sudo docker run hello-worldThis command downloads a test image and runs it in a container. When the container runs, it prints a message and exits.
Docker Engine is installed and running. The docker group is created but no users are added to it. You need to use sudo to run Docker commands.
-