Today I was trying to install Docker on my Raspberry Pi Zero W. However, I ran into some weird issues.
I installed the Docker Engine after reading through a bunch of tutorials, stackexchange questions, and the official docs, and settled on installing it through the convenience script, as explained in: https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script
The installation completes successfully. After a reboot, to make sure that the docker daemon has started, I tried running the following command to ensure that everything is working fine:
docker run hello-world
I lose the terminal for a few seconds, then I get it back, but nothing gets printed out to the console. The docker logs
are empty. What's weird is that if I run echo $?
, I get 139
, so the process could not complete without facing an error. But without any error messages showing up, there is nothing I can do. Can someone identify the issue?
My Raspberry Pi Zero W (revision 1.1) is on armv6l/armhf architecture, I believe it should support docker and the hello-world image.
1 Answer 1
The architecture of the image being implicitly pulled is probably wrong. Looking at https://hub.docker.com/_/hello-world, we see that arm32v5
is available. So, pull it explicitly:
$ docker run arm32v5/hello-world
Unable to find image 'arm32v5/hello-world:latest' locally
latest: Pulling from arm32v5/hello-world
b6206e5d545d: Pull complete
Digest: sha256:afb5068abb74f02a4078a32237f090d28eb393e825fc1ac20a997c22c96739de
Status: Downloaded newer image for arm32v5/hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(arm32v5)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
Like you (perhaps?), I've had a cluster of Raspi Zeroes running for years, but it's getting trickier to maintain. Time might be running out ;)
For more info, see: https://github.com/moby/moby/issues/37647
-
thank you, in the meantime I found out about the per-architecture image builds, so arm32v6/node was working fine for me :)Zsombor– Zsombor2020年12月02日 09:36:24 +00:00Commented Dec 2, 2020 at 9:36
docker ps -a
say after you try therun
(edit it into the question)?