Install Docker on Raspbian

Azure Container Registry is a managed, private Docker registry service that allows you to build, store, and manage container images and artifacts.

Overview

This installs Docker community Edition onto a Raspberry Pi

The host OS is Raspbian running on Raspberry Pi hardware (Raspberry Pi 4 4 GiB running Pi OS Lite.)

Prepare the Raspberry Pi

As this will be a server in your environment that should be addressed on a reusable value it’ll be good practice to set a static IP and/or a hostname that is resolvable in your environment.

Raspbian

Make sure your Raspberry Pi is up to date and running the latest packages.

sudo apt-get update -y && sudo apt-get upgrade -y

Download and run the Docker installer script

The first command will download a script provided by Docker that will install Docker without much effort on your part. The second command executes the script and shows you a version table when completed.

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Alt Text
Docker is installed

Add your user to the Docker group

By default only Root can run Docker commands. You can skip this step and just prefix your Docker commands with SUDO but that’s annoying and you’ll find yourself forgetting. So you can add your user to the Docker group that allows it to run Docker commands with SUDO.

This uses pi as the username but change it to suit your own setup.

sudo usermod -aG docker pi

Test your Docker environment

A quick and simple test is to run the Docker Hello-World container.

docker run hello-world
Alt Text
Docker Hello World results

Install Docker Compose

Install the Docker Compose software.

sudo apt install docker-compose

Last modified February 19, 2025: Update azure-point-to-site-vpn.md (a9c807a)