Can't build image on raspberry pi4
getting below error when trying to build on raspberry pi 4.
no matching manifest for linux/arm/v7 in the manifest list entries
Just ran into this same issue. When attempting to run on RPi4 using Docker for linux/arm64 I receive this output: standard_init_linux.go:211: exec user process caused "exec format error"
@jonmacchio Using @sameersbn image i have managed to get this rebuilt for armv7 now and got it running on pi4
@ashvants Any advice on how to rebuild for arm architecture?
It is not straight forward build process., needs some level of debugging as well. To run the builds on Docker for pi run the buildx command as below; BuilderName can be anything you want eg., TestBuilder
docker buildx create --name BuilderName docker buildx use BuilderName
#Login to your container registry docker login
#Build and push to your container repository Docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t registry/repository --no-cache --push .
or if you want to skip the steps and try my build which is available on docker registry you can try running the
docker pull ashvants01/bind-testv1:latest
without user config
docker run --name bind -d --restart=always --publish 53:53/tcp --publish 53:53/udp --publish 10000:10000/tcp --volume ~/bind/srv/docker/bind:/data ashvants01/bind-testv1:latest
#with root user config sudo docker run --name bind -d --restart=always --publish 53:53/udp --publish 10000:10000 --env='BIND_USER=root' --env='ROOT_PASSWORD=*****' --dns=127.0.0.1 --volume ~/bind/srv/docker/bind:/data ashvants01/bind-testv1:latest
@ashvants Was able to follow your steps and got bind working and successfully logged in to webmin! Thanks!!
@ashvants
It doesn't work for me. :disappointed:
On the first run I got this errors:
=> [linux/amd64 internal] load metadata for docker.io/library/ubuntu:focal-20200423 6.3s
=> [linux/arm64 internal] load metadata for docker.io/library/ubuntu:focal-20200423 6.3s
=> ERROR [linux/arm/v7 internal] load metadata for docker.io/library/ubuntu:focal-20200423 3.8s
=> [internal] load build context 0.0s
=> => transferring context: 35B 0.0s
=> ERROR [linux/arm/v7 add-apt-repositories 1/2] FROM docker.io/library/ubuntu:focal-20200423 0.0s
=> => resolve docker.io/library/ubuntu:focal-20200423 1.6s
=> CANCELED [linux/arm64 add-apt-repositories 1/2] FROM docker.io/library/ubuntu:focal-20200423@sha256:238e696992ba9913d24cfc3727034985abd136e08ee3067982401acdc30cbf3f 1.8s
=> => resolve docker.io/library/ubuntu:focal-20200423@sha256:238e696992ba9913d24cfc3727034985abd136e08ee3067982401acdc30cbf3f 1.9s
=> => sha256:238e696992ba9913d24cfc3727034985abd136e08ee3067982401acdc30cbf3f 979B / 979B 0.0s
=> CANCELED [linux/amd64 add-apt-repositories 1/2] FROM docker.io/library/ubuntu:focal-20200423@sha256:238e696992ba9913d24cfc3727034985abd136e08ee3067982401acdc30cbf3f 1.8s
=> => resolve docker.io/library/ubuntu:focal-20200423@sha256:238e696992ba9913d24cfc3727034985abd136e08ee3067982401acdc30cbf3f 0.0s
=> => sha256:238e696992ba9913d24cfc3727034985abd136e08ee3067982401acdc30cbf3f 979B / 979B 0.0s
------
> [linux/arm/v7 internal] load metadata for docker.io/library/ubuntu:focal-20200423:
------
------
> [linux/arm/v7 add-apt-repositories 1/2] FROM docker.io/library/ubuntu:focal-20200423:
------
failed to solve: rpc error: code = Unknown desc = failed to load cache key: no match for platform in manifest sha256:238e696992ba9913d24cfc3727034985abd136e08ee3067982401acdc30cbf3f: not found
After I changes the tag for the base image from ubuntu:focal-20200423 to ubuntu:focal it worked bestter but after some computing I got this error:
=> [linux/amd64 add-apt-repositories 2/2] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg && apt-key adv --fetch-keys http://www.webmin.com/jcameron-key.asc 10.6s
=> CANCELED [linux/arm64 add-apt-repositories 2/2] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg && apt-key adv --fetch-keys http://www.webmin.com/jcamero 10.7s
=> CANCELED [linux/arm/v7 add-apt-repositories 2/2] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg && apt-key adv --fetch-keys http://www.webmin.com/jcamer 10.7s
=> ERROR [linux/amd64 stage-1 2/6] COPY --from=add-apt-repositories /etc/apt/trusted.gpg /etc/apt/trusted.gpg 0.0s
------
> [linux/amd64 stage-1 2/6] COPY --from=add-apt-repositories /etc/apt/trusted.gpg /etc/apt/trusted.gpg:
------
failed to solve: rpc error: code = Unknown desc = failed to compute cache key: "/etc/apt/trusted.gpg" not found: not found
I ran the build on a Mac (macOS 10 with Docker Desktop 2.4.0.0 Engine 19.03.13) and an Linux machine (Ubuntu Bionic with Docker version 19.03.13, build 4484c46d9d) with exact the same results.