jgibbon / docker-qemu-rpi-os

Docker images with Raspberry Pi OS running on QEMU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Raspberry Pi OS for Arm Virtualised with QEMU

Docker images with a QEMU virtual machine emulating ARMv6 and running Raspberry Pi OS (formerly Raspbian) for the armhf architecture.

Oversimplified diagram:

+-------------------------------+
|                               |
|  Docker Container             |
|                               |
|  +-------------------------+  |
|  |                         |  |
|  |  Raspberry Pi OS        |  |
|  |                         |  |
|  +-------------------------+  |
|  |                         |  |
|  |  QEMU Emulating ARMv6   |  |
|  |                         |  |
|  +-------------------------+  |
|                               |
+-------------------------------+
|                               |
|  PC Host OS                   |
|                               |
+-------------------------------+

These Docker images are built on top of the fantastic dockerpi project, all credit for the hard work goes to them. The main difference in this version is that the Raspberry Pi OS Lite image used has been updated to enable autologin and ssh.

These changes make these images useful for things like running automated tests on CI, like GitHub Actions.

How to use these images

The main image produced in this repository can be run with this command:

docker run -it ghcr.io/carlosperate/qemu-rpi-os-lite:buster-latest

This will drop you into a bash session inside Raspberry Pi OS.

SSH

You can also launch an image with port forwarding and access it via SSH:

docker run -it -p 5022:5022 ghcr.io/carlosperate/qemu-rpi-os-lite:buster-latest
  • SSH port: 5022
  • SSH username: pi
  • SSH password: raspberry

Available Images

The main latest image is buster-latest:

ghcr.io/carlosperate/qemu-rpi-os-lite:buster-latest

There are two additional versions for each release (they do not have a latest tag, so they include the OS release date in the tag name).

  1. reduced-disk contains a smaller disk size, which might be enough for small jobs. The difference is that the default image expands the disk by an extra 1GB of space, to reach a total of about ~1.5 GB of free disk.
    ghcr.io/carlosperate/qemu-rpi-os-lite:buster-yyyy-mm-dd-reduced-disk
    
  2. Mu, an specialised image with the Mu Editor dependencies pre-installed, which is used for CI tests:
    ghcr.io/carlosperate/qemu-rpi-os-lite:buster-yyyy-mm-dd-mu-latest
    

All images can be found here: https://github.com/carlosperate/docker-qemu-rpi-os/pkgs/container/qemu-rpi-os-lite

Releases

Each OS release is tracked and customised edited via this Raspberry Pi OS Custom Image repository, which then hosts the custom images in its releases page.

Older OS versions

Older versions of Raspbian/Raspberry Pi OS have been tagged and published:

docker run -it ghcr.io/carlosperate/qemu-rpi-os-lite:jessie-latest
docker run -it ghcr.io/carlosperate/qemu-rpi-os-lite:stretch-latest

Build and run this docker image from the repository

git clone https://github.com/carlosperate/docker-qemu-rpi-os.git
cd docker-qemu-rpi-os
docker build -t carlosperate/qemu-rpi-os-lite .
docker run -it carlosperate/qemu-rpi-os-lite

About

Docker images with Raspberry Pi OS running on QEMU

License:MIT License


Languages

Language:Shell 64.2%Language:Dockerfile 35.8%