12/27/2021

Install Docker Raspberry Pi 4

68
  1. Install Docker Raspberry Pi 4
  2. Install Docker Raspberry Pi 4 Software Download
  3. Install Docker Compose Raspberry Pi 4
  4. Install Docker Raspberry Pi 4 Model B

Here is a list of the equipment we recommend for this Raspberry Pi Docker tutorial. Raspberry Pi 1, 2, 3 or 4. Ethernet Cord or WiFi dongle (The Pi 3 and 4 has WiFi inbuilt) Optional. Raspberry Pi Case. This tutorial was tested using Raspbian Buster. Compared to Raspberry Pi 3, Raspberry Pi 4 has plenty of RAM (there are 2GB, 4GB, and 8GB models). Therefore, Raspberry Pi 4 can serve as a low-cost Docker solution for app development and other.

Since I'm going to use Docker to build my OpenFaaS functions, I need to install Docker and have buildx in it. I have installed Docker before and could not run command:

So, if you have docker installed and can execute that, you can skip this part.

Note

I'm doing this only on one of my nodes, control01, so I can build arm64 native images and push them to registry, and also build OpenFaaS functions. Building OpenFaaS functions on the same node where the server is running is not recommended, and Alex Ellis told me personally that that’s not the way it should be done! You should build on your client and push to OpenFaaS gateway from there, and so on... However, I can confirm this works just fine, and it’s less hassle for me as I can also setup GitLab worker on this node and have my stuff build automatically there whenever I push to my local GitLab (GitLab is on a different server in my network, outside the scope of this guide.)

Clean slate first

Remove the installation you have now.

Install Docker Raspberry Pi 4

Install Docker

Install Docker on Ubuntu arm64 as follow. You will need all of these 🙂

Install new repo

Install Docker

Edit Docker settings

Add /etc/docker/daemon.json configuration for docker daemon.

Note

'insecure-registries': ['registry.cube.local:5000'] This is for insecure private registry running on HTTP, if you use TLS, you don't need this line.

Enable at boot and start docker daemon.

Adding support for multi-arch.

Some additional packages are needed.

Using buildx with private registry.

Note

This is mainly related to OpenFaaS, since it uses buildx with faas-cli

Raspberry

Buildx is running inside container.

I'm a bit fuzzy on exactly how and when this is created, to be honest. If it’s not there, try to run docker buildx.

Install Docker Raspberry Pi 4 Software Download

Here is the issue. The container does not know about your private registry, nor does it have a root certificate of it if you use TLS...

The solution for not knowing the private registry is to add it to containers /etc/hosts.

You can find it by inspecting the ID of the container:

My private registry address is 192.168.0.232 registry registry.cube.local, so lets add it:

This should be enough if you use the HTTP registry only.

TLS Fix for buildx

To push to a private TLS protected registry, you need to make the container aware of the root certificate.

You get the certificate I'm talking about when setting up a private Docker registry. Docker-Registry TLS

Install Docker Compose Raspberry Pi 4

This solution is from: GitHub Issue 80

This fixed the issue for me, and faas-cli works as expected 🙂

Did it help you ?

Install Docker Raspberry Pi 4 Model B

Comments

  • Most Viewed News

    • Node Lts Docker
    • Boot Mac Os High Sierra From Usb
    • Apple New Desktop