Running a armhf container for raspberry pi zero compiling
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Hello I am currently trying to emulate a raspberry pi zero with this Dockerfile:
FROM python:3.7.3-stretch
ENV QEMU_CPU=arm1176 #ENV Var recognized in order to emulate armv6.
ENV QEMU_MACHINE=versatilepb #Seems like its not used but is needed to emulate armhf
ENV CFLAGS=" -marm -mfpu=vfp -mtune=arm1176jzf-s -mfloat-abi=softfp"
COPY sources.list /etc/apt/sources.list
RUN wget https://archive.raspbian.org/raspbian.public.key -O - | apt-key add -
COPY . .
RUN python setup.py bdist --cythonize
The buildx command docker buildx build --platform=linux/arm/v6 -t skast/armv6 . --load
Basically it should import raspbian sources into the container and install all armhf related gcc compilers needed to "natively" build my cython packages.
The problem I ran into is that it seems that the container started with the command docker run --rm -it --platform=linux/arm/v6 skast/armv6 is armel, because on apt update with the imported raspbian commands it gives me this errors.

The uname -a command gives:
Linux 258b4dd0b814 5.12.13-arch1-2 #1 SMP PREEMPT Fri, 25 Jun 2021 22:56:51 +0000 armv6l GNU/Linux
What I need is a container that is running with multiarch, which emulates a raspberry pi zero but is not "completely" a raspberry pi like https://github.com/lukechilds/dockerpi
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Dockerfile and the docker buildx build --platform=linux/arm/v6 command, then compare the architecture reported by uname -a with the behavior of apt update using the imported Raspbian sources. Determine whether the requested armhf Raspberry Pi Zero container setup is supported and document the result or required configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- build-system, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100