Tick stack on a raspberry pi install docker on a raspberry pi raspberry pi s a raspberry pi 3 kuberes cer
As a Raspberry Pi tinkerer, this ease of replicating my environment had a lot of appeal, and working within the memory and processing constraints of a Raspberry Pi ruled out virtual machines as a means of doing it, so I wanted to see if I could get Docker up and running on my Raspberry Pi and then try it out. Also, You could try to build this image yourself. Maybe try with an official repository for golang: docker pull golang:latest. They also support your architecture: Supported architectures: md64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x, windows-amd6. Maybe this is a connection/firewall issue. Note: Currently there is a bug in Docker’s architecture detection that fails for arm32v6 - eg Raspberry Pi Zero or 1. For these devices you currently need to specify the full image tag, for example.
Jun 11, 2020 Docker is actually based on a x64 system, which is used on most modern computers. But Raspberry Pi uses ARM technology, meaning that normal Docker images aren’t compatible with the instance on Pi.
How to install docker on raspberry pi 4 install docker pose on raspberry pi upswift io traefik vs nginx for reverse proxy with docker on a raspberry pi alex hyett turn your raspberry pi into out of band monitoring device using docker collabnix my home server powered by pi and docker jordan crawford
While developing a web app for my Raspberry Pi Zero SMS gateway I ran into trouble. I wanted to be able to run the app in Docker but building an image from a Dockerfile on the RPi0 was incredibly slow and I didn't manage to complete it because my Pi ran out of memory.
I thought about creating the image locally and pushing it to Docker Hub but it felt a bit overkill for small, personal apps. After some thinking and googling I realised that you can save docker images and then load them on another computer.
There are 2 ways to go about this:
npm
on your computer, fetch all dependencies (node_modules
) and copy them together with the code into the armv6
image.npm
in a container with a multistage build and then copy the files to image.This is more useful and faster with an app you're developing yourself, since you probably have npm
installed.
Fetch the deps as usual with npm install
then add a Dockerfile
(and possibly a .dockerignore
).
This is useful when you want to make an image of someone elses project and/or don't want to install npm
on your machine.
Since you can't run the arm32v6/node
on your computer, you need to first use a working node image to fetch/build your project.
Then you can build and save your image...
... transfer it to your RPi (with scp
or whatever) and load it!
Doing this can get tedious if you make a lot of changes to your app, so I created a simple bash script that you can use: https://github.com/joenas/node-docker-raspberry-zero
Note: In my repo I've named the file Dockerfile.armv6
because I already have a Dockerfile
for running the app on other architectures that doesn't require a specific docker image. I also tag the image with the suffix :armv6
. The commands above would then be like this:
Here's a sample .dockerignore
file you can use to not include all the files in your image.
I hope you have any use for this and I'd love to see more stuff for the RPi0/1 so please comment below if you create something! 🙏