Platform mismatch with Docker on RPi4

I'm trying to slightly modify the Docker image, but I keep getting:

[WARNING] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested

I've read WARNING: The requested image's platform (linux/amd64) does not match the detected host platform and Wrong platform architecture on Docker Hub Images · Issue #735 · pi-hole/docker-pi-hole · GitHub , and although they describe the problem, I can't find the answer in those threads.

I'm on the latest Raspbian Buster, and installed Docker via the convenience scripts as described in .

$ docker version
Client: Docker Engine - Community
Version: 20.10.7
API version: 1.41
Go version: go1.13.15
Git commit: f0df350
Built: Wed Jun 2 11:57:27 2021
OS/Arch: linux/arm
Context: default
Experimental: true

Server: Docker Engine - Community
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: b0f5bc3
Built: Wed Jun 2 11:55:25 2021
OS/Arch: linux/arm
Experimental: false
Version: 1.4.6
GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d
Version: 1.0.0-rc95
GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
Version: 0.19.0
GitCommit: de40ad0

I've tried adding --platform=linux/arm/v7 to the docker build and docker run commands as well as to the FROM line in the Dockerfile, but that doesn't solve the problem.

We haven't found a solution. We've asked for help but have not had anyone respond that would be able and willing to help.

Thanks - I'll follow the GitHub issue and hope for a solution soon. Any kind of a workaround in the meantime?

1 Like

I can't really think of one. I know the message was a warning in one version of Docker, was ignored in versions previous to that and I have a fuzzy memory that the warnings were reverted back to being informational in more recent versions in the v20 series of docker engine.

What is the exact image you are using in your FROM line for your base image?

I've tried a bunch of different things, but right now I'm just using pihole/pihole:latest.

But maybe I'm misunderstanding the end result here ... I thought the mismatch was causing the build to fail, but I found an unrelated problem in my Dockerfile, and when I fixed that, it seems like the image is working, even though I keep getting the warnings. Is the warning really just inconsequential? Are there no bad effects other than the warning?

In previous versions of Docker engine it was just a warning. Then something changed and it became a error (from what I understand) that prevented things from starting. Then another update came for Docker engine and it looks like it's back to being a warning.

If Pi-hole starts then you're golden. pihole-FTL is compiled differently for different CPU architectures so it will only start if it's on a compatible platform.

Excellent! So I guess the workaround is to cover your eyes when the warning comes up :grin: I can do that!


1 Like