Docker Community Forums

Share and learn in the Docker community.

Building for armv7l architecture on OSX / pushing to Docker Hub


I’m trying to get RolfKoenders/potato (Mr. Potato, a Slack bot for CouchPotato) working under docker on a Raspberry Pi 4.

The dockerfile for that repo seems to be outdated, so I forked it and have been trying to build locally and pushing the image to Docker Hub so the Pi can pull it down.

After linking the repo to github, I enabled Docker’s experimental mode and tried to use buildx to create the image.

I’m the running:

docker buildx create --name multibuilder
docker buildx use multibuilder
docker buildx build --platform linux/arm/v7 -t rozling/potato --push .

The changes get pushed, but Docker Hub keeps trying to build with amd64 architecture.

I’ve tried following these tutorials:

But I’ve come away more confused than before: this stuff seems to be a mess of interdependencies.

In the first post, the key step seems to be:

Register QEMU in the build agent
The next step is to register QEMU in the build agent. There is a Docker image available that can do this for us in just one line:

docker run --rm --privileged multiarch/qemu-user-static:register --reset
That’s it. Just add this line to your YAML file before the other docker commands.

But I’ve no idea what YAML file they’re talking about; if this was a Dockerfile command it would start with RUN, right?

And I’m fairly new to Dockerfile syntax so I don’t get how using their qemu image makes things easier, or how I go from that point to pulling the node images I want to use, which I know have armv7 compatibility.

The second article seems to be for a slightly different architecture, armv7hf, and seems even more complex, so I’m not sure how useful it is.

Has anyone done this before, and can you point me in the right direction?