Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.01 KB

Docker.md

File metadata and controls

36 lines (26 loc) · 1.01 KB

Docker setup instructions for Raspberry Pi

  1. Install Docker on the pis:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker pi
sudo reboot
  1. Upgrade libseccomp (to work with updated APT repos on the base Ubuntu 20.04 images):
wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb

Cross-compilation on hosts

  1. Make sure Docker Buildx is installed.

  2. Create a custom builder for cross-compilation (only need to do this once):

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --name multiarch --driver docker-container --use
docker buildx inspect --bootstrap
  1. Build the multiarch images and push:
docker buildx build --push --platform=linux/armhf,linux/amd64 -t molguin/cleave:base --target base .
docker buildx build --push --platform=linux/armhf,linux/amd64 -t molguin/cleave:cleave --target cleave .