Vasco Guita Gives Raspberry Pi Homelabbers a Gift: Scratch Raspberry Pi OS Docker Images

Built from Raspberry Pi's official operating system images, these 32-bit and 64-bit images get your Docker containers up and running fast.

Vasco Guita, developer at the European Organization for Nuclear Research (CERN), has released a missing piece of the puzzle for those looking to easily integrate a Raspberry Pi into their homelab setup: a Raspberry Pi OS base image for the Docker containerization system.

"I run most of my homelab and [Raspberry] Pi projects in Docker," Guita explains. "But I've always found it annoying that there is no official Raspberry Pi OS base image on Docker Hub. Standard Debian images are usually fine, but sometimes you just want the specific tweaks, packages, and environment native to Raspberry Pi OS. I decided to scratch my own itch and built an automated pipeline to publish pure Raspberry Pi OS Docker images."

Raspberry Pi OS is now available as a clean Docker image, thanks to a project by Vasco Guita. (📷: Vasco Guita)

Docker allows you to deploy and manage virtualized containers, which separate a given application from the underlying operating system — effectively turning one computer into many. A base image comes with its "guest" operating system already setup, ready for you to install your own application — but Raspberry Pi doesn't make Raspberry Pi OS, its in-house distribution based on a tweaked Debian Linux, available as a Docker image.

"I didn't want this to just be a modified Debian base. I wanted it to be as close to official as possible," Guita says of his project. "The pipeline uses a GitHub Action that downloads the official Raspberry Pi OS Lite .img.xz releases directly from downloads.raspberrypi.com. It then uses libguestfs-tools to mount the image, extract the raw root filesystem, strip out hardware-specific mounts (/dev, /proc, /sys, /boot), and plop it into a scratch Docker container."

The images, published to Docker Hub for ease of use, target those looking to create sandbox environments for testing, those looking to experiment with "version hopping" between different Raspberry Pi OS releases, and anyone who wants to create their own application-specific Docker images for wider deployment.

The Docker images are available on Docker Hub now in 32-bit and 64-bit variants and can also be found on GitHub, under the permissive MIT license; more information is available in Guita's Reddit post.

ghalfacree

Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.

Latest Articles