
Once done you must logout and log back in to take this effect Test Docker Installation In order to run the docker without sudo, you need to add the user to dockergroup sudo usermod -aG docker $USER $ sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-compose-pluginĪdd your user to the Docker group (Optional) Select the desired version and install: $ VERSION_STRING=5:18.09.0~3-0~debian-stretch To install a specific version of Docker Engine, start by list the available versions in the repository: # List the available versions: To install a specific version of Docker Engine, start by list the available versions in the repository: Install Docker Engine, containerd sudo apt-get install docker-ce docker-ce-cli containerd.io Try granting read permission for the Docker public key file before updating the package index: $ sudo chmod a+r /etc/apt/keyrings/docker.gpg Your default umask may be incorrectly configured, preventing detection of the repository public key file. Receiving a GPG error when running apt-get update? Update the apt package index: $ sudo apt-get update This procedure works for Debian on x86_64 / amd64, armhf, arm64, and Raspbian. $(lsb_release -cs) stable" | sudo tee /etc/apt//docker.list > /dev/null Use the following command to set up the repository: $ echo \ $ curl -fsSL | sudo gpg -dearmor -o /etc/apt/keyrings/docker.gpg Update the apt package index and install packages to allow apt to use a repository over HTTPS: $ sudo apt-get updateĪdd Docker’s official GPG key: $ sudo mkdir -p /etc/apt/keyrings


Let's say, you are running any other OS apart from raspbian or ubuntu, Or you may want to install the package manually, here is the steps. To do this, the following command is needed: The Long Path The first is to set Docker to auto-start every time the Raspberry Pi is turned on or rebooted. Once Docker is installed using the above command, there are still a few manual steps that are needed to get the best experience on the device.

This is far easier than previous ways, which relied on a very manual process which often meant building Docker from scratch on a Raspberry Pi. If you are running debian based OS on your Pi, the easy way to install docker is with below automated script. Install Docker on Raspberry Pi The Short Path
