Skip to content

Latest commit

 

History

History
58 lines (31 loc) · 2.07 KB

README.md

File metadata and controls

58 lines (31 loc) · 2.07 KB

Raspberry Pi

Raspberry Pi virtual machine in Qemu

This is a container for emulating the raspbian lite distribution inside a qemu emulated raspberry pi.

You can get the QEMU Window via ssh -X/VNC/noVNC (http). You can also directly connect to the qemu raspberry on port 2222.

You can only connect once to one container. if you want multiple raspberrys, run the docker container multiple times.

You can preserve the image by mounting the volume /images to an persistent volume. Also if you supply it with a qemu patched raspberry pi image with the name raspberry.img qemu will start this image right away.

Attention: If you use ssh -X to get the qemu window - running instances of the qemu raspberry will be killed and boot again (which takes some time), better use novnc or vnc if you want raspberry with gui

The Docker Healthcheck checks if ssh of raspberry is reachable

It's based on DesktopContainers/base-mate

Usage: Run the Client

Simple SSH X11 Forwarding

You can either connect via ssh to the qemu raspberry rasbian system or get the qemu X11 GUI, here is how you use it:

  1. Run a background container as server or start existing one.

    docker start raspberrypi || docker run -d --name raspberrypi -p 2222:2222 -p 80:80 -p 443:443 --privileged desktopcontainers/raspberrypi

2.1 Connect directly to the qemu raspberry via ssh. (Keep an eye on docker healthcheck status - ssh is available when it's healthy)

    ssh -p 2222 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no pi@localhost

2.2 See the qemu environment (window) on http://localhost

Options and Configuration

Volumes

  • /images place where the raspberry pi image will be stored as raspberry.img

Exposed Ports

  • 2222 for ssh connection to the qemu raspberry pi (raspbian lite)

Passwords

  • User: pi
  • Password: raspberry

Environment variables and defaults

  • FS_EXTEND_GB
  • default: 8 - can be any number to increase fs size of rootfs.
  • RC_LOCAL_COMAND
  • no default - bash comands to include in rc.local