Install Docker and Docker Compose on Raspberry Pi

Tiempo de lectura: < 1 minuto

Reading time: 2 minutes

Hello, today we are going to see how we can install Docker and Docker Compose on a Raspberry Pi.

The first thing we need to do is run this command to update the OS resources:

sudo apt update
sudo apt upgrade

First, we install these dependencies necessary to install the Docker repository certificates.

sudo apt install apt-transport-https ca-certificates curl software-properties-common

Choose Y and accept to restart the requested services.

Now we add Docker keys and certificates:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg  sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Add the Docker repository:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Update the dependencies:

sudo apt update

Install Docker:

sudo apt install docker-ce

Leave a Comment