A Virtualised Raspberry Pi inside a Docker image
Gives you access to a virtualised ARM based Raspberry Pi machine running the Raspian operating system.
This is not just a Raspian Docker image, it's a full ARM based Raspberry Pi virtual machine environment.
docker run -it hmsjy2017/dockerpi-armhf
By default all filesystem changes will be lost on shutdown. You can persist filesystem changes between reboots by mounting the /sdcard volume on your host:
docker run -it -v $HOME/.dockerpi:/sdcard hmsjy2017/dockerpi-armhf
If you have a specific image you want to mount you can mount it at /sdcard/filesystem.img:
docker run -it -v /2019-09-26-raspbian-buster-lite.img:/sdcard/filesystem.img hmsjy2017/dockerpi-armhf
If you only want to mount your own image, you can download a much slimmer VM only Docker container that doesn't contain the Raspbian filesystem image:
docker run -it -v /2019-09-26-raspbian-buster-lite.img:/sdcard/filesystem.img hmsjy2017/dockerpi-armhf:vm
By default a Raspberry Pi 1 is virtualised, however experimental support has been added for Pi 2 and Pi 3 machines.
You can specify a machine by passing the name as a CLI argument:
docker run -it hmsjy2017/dockerpi-armhf pi1
docker run -it hmsjy2017/dockerpi-armhf pi2
docker run -it hmsjy2017/dockerpi-armhf pi3
Note: Pi 2 and Pi 3 support is currently experimental. Networking doesn't work and QEMU hangs once the machines are powered down requiring you to
docker killthe container. See #4 for details.
A full ARM environment is created by using Docker to bootstrap a QEMU virtual machine. The Docker QEMU process virtualises a machine with a single core ARM11 CPU and 256MB RAM, just like the Raspberry Pi. The official Raspbian image is mounted and booted along with a modified QEMU compatible kernel.
You'll see the entire boot process logged to your TTY until you're prompted to log in with the username/password pi/raspberry.
Content type
Image
Digest
Size
455.2 MB
Last updated
about 6 years ago
docker pull hmsjy2017/dockerpi-armhf