A Mini Raspberry Pi-based Docker / Kubernetes Lab

Computers 1x Raspberry Pi Model B+ Rev 1.2 w/ a ARMv6 CPU and 512MB RAM (as cluster controller)
4x Raspberry Pi 3 Model B Rev 1.2 w/ a quad-core ARMv7 CPU and 1GB RAM (as compute nodes)
Storage 16 / 32GB Micro-SD cards for root filesystem, 0 / 64GB USB Flash drives for additional storage
Network Mikrotik RB951G 5-port Gigabit Ethernet switch with 2.4GHz 802.11b/g/n wireless support
Power 1x iSmart 6-port 60W USB Charging Station
5x 30cm Micro USB Cable with 20 AWG power wires
Hardware 5x Raspberry Pi DIN Rail Mounts
1x 3.5 x 30cm slotted aluminium DIN rail
1x 36 x 56cm Skådis pegboard

Under Linux, Docker stores images and their layers under /var/lib/docker/overlays2. One might imagine that something like NFS could be used to locally cache these layers, however, given how the Docker Engine works, this isn't actually possible. Instead, to alleviate the need for each host to pull layers down from the Internet, one …

See https://docs.docker.com/registry/ and https://docs.docker.com/registry/recipes/mirror/#run-a-registry-as-a-pull-through-cache for more information.

On the registry host, bring up a registry instance using the following Docker Compose file:

  restart: always
  image: registry:2
    - 5000:5000
    REGISTRY_PROXY_REMOTEURL: https://registry-1.docker.io
    - /data/docker/registry:/var/lib/registry

To configure the other hosts to use this new local registry, make sure that /etc/docker/daemon.json contains, at a minimum, the following entry:

  "registry-mirrors": ["http://hypriot-ctl:5000"]
  • Last modified: 2022-02-16 09:37
  • by Peter