Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build image on raspberry pi4 #99

Open
ashvants opened this issue Jul 23, 2020 · 6 comments
Open

Can't build image on raspberry pi4 #99

ashvants opened this issue Jul 23, 2020 · 6 comments

Comments

@ashvants
Copy link

getting below error when trying to build on raspberry pi 4.

no matching manifest for linux/arm/v7 in the manifest list entries

@jonmacchio
Copy link

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"

@ashvants
Copy link
Author

@jonmacchio Using @sameersbn image i have managed to get this rebuilt for armv7 now and got it running on pi4

@jonmacchio
Copy link

@ashvants Any advice on how to rebuild for arm architecture?

@ashvants
Copy link
Author

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

@jonmacchio
Copy link

@ashvants Was able to follow your steps and got bind working and successfully logged in to webmin! Thanks!!

@thoschworks
Copy link

@ashvants

It doesn't work for me. 😞

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants