Hey I’m trying to build a docker image using both https://github.com/moby/buildkit/blob/master/examples/kubernetes/deployment%2Bservice.privileged.yaml and https://github.com/moby/buildkit/blob/master/examples/kubernetes/deployment%2Bservice.rootless.yaml
I tried running the following command from another pod (ubuntu 18.04) and from my local machine (macOS):
buildctl --debug --addr kube-pod://buildkitd-priv-656b6f849d-sztsw build --frontend dockerfile.v0 --local context=/private/tmp/test --local dockerfile=/private/tmp/test
Unfortunately, no matter what I do I keep getting the following error:
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get -y update]: exit code: 100
Full debug log is available bellow.
Any idea what am I doing wrong?
Debug log
DEBU[0000] commandconn: starting kubectl with [—context= —namespace= exec —container= -i buildkitd-priv-656b6f849d-sztsw — buildctl dial-stdio]
[+] Building 0.0s (0/0)
DEBU[0002] unimplemented call: SetReadDeadline(0001-01-01 00:00:00 +0000 UTC)
[+] Building 6.1s (6/15)
[+] Building 6.2s (7/15)
=> [internal] load build definition from Dockerfile 0.5s
=> => transferring dockerfile: 818B 0.4s
=> [internal] load .dockerignore 0.3s
=> => transferring context: 2B 0.3s
=> [internal] load metadata for docker.io/library/ubuntu:latest 2.9s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> [ 1/11] FROM docker.io/library/ubuntu@sha256:aba80b77e27148d99c034a987e7da3a287ed455390352663418c0f2ed40417fe 0.1s
=> => resolve docker.io/library/ubuntu@sha256:aba80b77e27148d99c034a987e7da3a287ed455390352663418c0f2ed40417fe 0.1s
=> CACHED [ 2/11] RUN echo «deb http://us.archive.ubuntu.com/ubuntu/ precise universe» >> /etc/apt/sources.list 0.0s
=> ERROR [ 3/11] RUN apt-get -y update 2.6s
[ 3/11] RUN apt-get -y update:
#7 0.207 Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
#7 0.261 Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
#7 0.273 Get:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
#7 0.344 Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
#7 0.393 Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
#7 0.409 Ign:6 http://us.archive.ubuntu.com/ubuntu precise InRelease
#7 0.437 Get:7 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
#7 0.439 Get:8 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
#7 0.440 Get:9 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
#7 0.493 Err:10 http://us.archive.ubuntu.com/ubuntu precise Release
#7 0.493 404 Not Found [IP: 91.189.91.39 80]
#7 0.555 Get:11 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [357 kB]
#7 0.559 Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1305 kB]
#7 0.572 Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1032 kB]
#7 0.581 Get:14 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [32.0 kB]
#7 0.583 Get:15 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [4305 B]
#7 0.790 Get:16 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.6 kB]
#7 0.888 Get:17 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [884 kB]
#7 1.163 Get:18 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [328 kB]
#7 1.199 Get:19 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [777 kB]
#7 1.585 Reading package lists…
#7 2.345 E: The repository ‘http://us.archive.ubuntu.com/ubuntu precise Release’ does not have a Release file.
Dockerfile:5
3 |
4 | RUN echo «deb http://us.archive.ubuntu.com/ubuntu/ precise universe» >> /etc/apt/sources.list
5 | >>> RUN apt-get -y update
6 | RUN apt-get install -y g++
7 | RUN apt-get install -y erlang-dev erlang-manpages erlang-base-hipe erlang-eunit erlang-nox erlang-xmerl erlang-inets
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get -y update]: exit code: 100
1 1c037fd buildkitd —addr unix:///run/buildkit/buildkitd.sock —addr tcp://0.0.0.0:1234 —tlscacert /certs/ca.pem —tlscert /certs/cert.pem —tlskey /certs/key.pem
github.com/moby/buildkit/executor/runcexecutor.exitError
/src/executor/runcexecutor/executor.go:354
github.com/moby/buildkit/executor/runcexecutor.(*runcExecutor).Run
/src/executor/runcexecutor/executor.go:334
github.com/moby/buildkit/solver/llbsolver/ops.(*execOp).Exec
/src/solver/llbsolver/ops/exec.go:337
github.com/moby/buildkit/solver.(*sharedOp).Exec.func2
/src/solver/jobs.go:787
github.com/moby/buildkit/util/flightcontrol.(*call).run
/src/util/flightcontrol/flightcontrol.go:121
sync.(*Once).doSlow
/usr/local/go/src/sync/once.go:68
sync.(*Once).Do
/usr/local/go/src/sync/once.go:59
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
1 1c037fd buildkitd —addr unix:///run/buildkit/buildkitd.sock —addr tcp://0.0.0.0:1234 —tlscacert /certs/ca.pem —tlscert /certs/cert.pem —tlskey /certs/key.pem
github.com/moby/buildkit/solver/llbsolver/ops.(*execOp).Exec
/src/solver/llbsolver/ops/exec.go:357
github.com/moby/buildkit/solver.(*sharedOp).Exec.func2
/src/solver/jobs.go:787
github.com/moby/buildkit/util/flightcontrol.(*call).run
/src/util/flightcontrol/flightcontrol.go:121
sync.(*Once).doSlow
/usr/local/go/src/sync/once.go:68
sync.(*Once).Do
/usr/local/go/src/sync/once.go:59
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
1 1c037fd buildkitd —addr unix:///run/buildkit/buildkitd.sock —addr tcp://0.0.0.0:1234 —tlscacert /certs/ca.pem —tlscert /certs/cert.pem —tlskey /certs/key.pem
github.com/moby/buildkit/solver.(*edge).execOp
/src/solver/edge.go:894
github.com/moby/buildkit/solver/internal/pipe.NewWithFunction.func2
/src/solver/internal/pipe/pipe.go:82
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
60355 0.8.0 buildctl —debug —addr kube-pod://buildkitd-priv-656b6f849d-sztsw build —frontend dockerfile.v0 —local context=/private/tmp/test —local dockerfile=/private/tmp/test
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1.1.1
github.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/chain.go:72
github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingClientInterceptor.func1
github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/client.go:60
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1.1.1
github.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/chain.go:72
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1
github.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/chain.go:81
google.golang.org/grpc.(*ClientConn).Invoke
google.golang.org/grpc@v1.29.1/call.go:35
github.com/moby/buildkit/api/services/control.(*controlClient).Solve
github.com/moby/buildkit/api/services/control/control.pb.go:1321
github.com/moby/buildkit/client.(*Client).solve.func2
github.com/moby/buildkit/client/solve.go:201
golang.org/x/sync/errgroup.(*Group).Go.func1
golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208/errgroup/errgroup.go:57
runtime.goexit
runtime/asm_amd64.s:1374
60355 0.8.0 buildctl —debug —addr kube-pod://buildkitd-priv-656b6f849d-sztsw build —frontend dockerfile.v0 —local context=/private/tmp/test —local dockerfile=/private/tmp/test
github.com/moby/buildkit/client.(*Client).solve.func2
github.com/moby/buildkit/client/solve.go:214
golang.org/x/sync/errgroup.(*Group).Go.func1
golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208/errgroup/errgroup.go:57
runtime.goexit
runtime/asm_amd64.s:1374
Dockerfile
FROM ubuntu
MAINTAINER Kimbro Staken
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get install -y g++
RUN apt-get install -y erlang-dev erlang-manpages erlang-base-hipe erlang-eunit erlang-nox erlang-xmerl erlang-inets
RUN apt-get install -y libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool wget
RUN cd /tmp ; wget http://www.bizdirusa.com/mirrors/apache/couchdb/source/1.3.1/apache-couchdb-1.3.1.tar.gz
RUN cd /tmp && tar xvzf apache-couchdb-1.3.1.tar.gz
RUN apt-get install -y make
RUN cd /tmp/apache-couchdb-* ; ./configure && make install
RUN printf "[httpd]nport = 8101nbind_address = 0.0.0.0" > /usr/local/etc/couchdb/local.d/docker.ini
EXPOSE 8101
CMD ["/usr/local/bin/couchdb"]
Содержание
- error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get -y update]: exit code: 100 #2194
- Comments
- Debug log
- Dockerfile
- Solution for Docker issue failed to solve: rpc error: code = unknown desc
- Docker Error Messages
- Problem
- Docker Setup
- Solution
- Conclusion
- failed to solve: rpc error #693
- Comments
- Footer
- failed running [/dev/.buildkit_qemu_emulator /bin/sh -c which ls]: exit code: 127 #464
- Comments
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get -y update]: exit code: 100 #2194
I tried running the following command from another pod (ubuntu 18.04) and from my local machine (macOS):
Unfortunately, no matter what I do I keep getting the following error:
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get -y update]: exit code: 100
Full debug log is available bellow.
Any idea what am I doing wrong?
Debug log
DEBU[0000] commandconn: starting kubectl with [—context= —namespace= exec —container= -i buildkitd-priv-656b6f849d-sztsw — buildctl dial-stdio]
[+] Building 0.0s (0/0)
DEBU[0002] unimplemented call: SetReadDeadline(0001-01-01 00:00:00 +0000 UTC)
[+] Building 6.1s (6/15)
[+] Building 6.2s (7/15)
=> [internal] load build definition from Dockerfile 0.5s
=> => transferring dockerfile: 818B 0.4s
=> [internal] load .dockerignore 0.3s
=> => transferring context: 2B 0.3s
=> [internal] load metadata for docker.io/library/ubuntu:latest 2.9s
=> [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s
=> [ 1/11] FROM docker.io/library/ubuntu@sha256:aba80b77e27148d99c034a987e7da3a287ed455390352663418c0f2ed40417fe 0.1s
=> => resolve docker.io/library/ubuntu@sha256:aba80b77e27148d99c034a987e7da3a287ed455390352663418c0f2ed40417fe 0.1s
=> CACHED [ 2/11] RUN echo «deb http://us.archive.ubuntu.com/ubuntu/ precise universe» >> /etc/apt/sources.list 0.0s
=> ERROR [ 3/11] RUN apt-get -y update 2.6s
[ 3/11] RUN apt-get -y update:
#7 0.207 Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
#7 0.261 Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
#7 0.273 Get:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
#7 0.344 Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
#7 0.393 Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
#7 0.409 Ign:6 http://us.archive.ubuntu.com/ubuntu precise InRelease
#7 0.437 Get:7 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
#7 0.439 Get:8 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
#7 0.440 Get:9 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
#7 0.493 Err:10 http://us.archive.ubuntu.com/ubuntu precise Release
#7 0.493 404 Not Found [IP: 91.189.91.39 80]
#7 0.555 Get:11 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [357 kB]
#7 0.559 Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1305 kB]
#7 0.572 Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1032 kB]
#7 0.581 Get:14 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [32.0 kB]
#7 0.583 Get:15 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [4305 B]
#7 0.790 Get:16 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.6 kB]
#7 0.888 Get:17 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [884 kB]
#7 1.163 Get:18 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [328 kB]
#7 1.199 Get:19 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [777 kB]
#7 1.585 Reading package lists.
#7 2.345 E: The repository ‘http://us.archive.ubuntu.com/ubuntu precise Release’ does not have a Release file.
Dockerfile:5
3 |
4 | RUN echo «deb http://us.archive.ubuntu.com/ubuntu/ precise universe» >> /etc/apt/sources.list
5 | >>> RUN apt-get -y update
6 | RUN apt-get install -y g++
7 | RUN apt-get install -y erlang-dev erlang-manpages erlang-base-hipe erlang-eunit erlang-nox erlang-xmerl erlang-inets
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get -y update]: exit code: 100
1 1c037fd buildkitd —addr unix:///run/buildkit/buildkitd.sock —addr tcp://0.0.0.0:1234 —tlscacert /certs/ca.pem —tlscert /certs/cert.pem —tlskey /certs/key.pem
github.com/moby/buildkit/executor/runcexecutor.exitError
/src/executor/runcexecutor/executor.go:354
github.com/moby/buildkit/executor/runcexecutor.(*runcExecutor).Run
/src/executor/runcexecutor/executor.go:334
github.com/moby/buildkit/solver/llbsolver/ops.(*execOp).Exec
/src/solver/llbsolver/ops/exec.go:337
github.com/moby/buildkit/solver.(*sharedOp).Exec.func2
/src/solver/jobs.go:787
github.com/moby/buildkit/util/flightcontrol.(*call).run
/src/util/flightcontrol/flightcontrol.go:121
sync.(*Once).doSlow
/usr/local/go/src/sync/once.go:68
sync.(*Once).Do
/usr/local/go/src/sync/once.go:59
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
1 1c037fd buildkitd —addr unix:///run/buildkit/buildkitd.sock —addr tcp://0.0.0.0:1234 —tlscacert /certs/ca.pem —tlscert /certs/cert.pem —tlskey /certs/key.pem
github.com/moby/buildkit/solver/llbsolver/ops.(*execOp).Exec
/src/solver/llbsolver/ops/exec.go:357
github.com/moby/buildkit/solver.(*sharedOp).Exec.func2
/src/solver/jobs.go:787
github.com/moby/buildkit/util/flightcontrol.(*call).run
/src/util/flightcontrol/flightcontrol.go:121
sync.(*Once).doSlow
/usr/local/go/src/sync/once.go:68
sync.(*Once).Do
/usr/local/go/src/sync/once.go:59
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
1 1c037fd buildkitd —addr unix:///run/buildkit/buildkitd.sock —addr tcp://0.0.0.0:1234 —tlscacert /certs/ca.pem —tlscert /certs/cert.pem —tlskey /certs/key.pem
github.com/moby/buildkit/solver.(*edge).execOp
/src/solver/edge.go:894
github.com/moby/buildkit/solver/internal/pipe.NewWithFunction.func2
/src/solver/internal/pipe/pipe.go:82
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
60355 0.8.0 buildctl —debug —addr kube-pod://buildkitd-priv-656b6f849d-sztsw build —frontend dockerfile.v0 —local context=/private/tmp/test —local dockerfile=/private/tmp/test
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1.1.1
github.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/chain.go:72
github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingClientInterceptor.func1
github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/client.go:60
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1.1.1
github.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/chain.go:72
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryClient.func1
github.com/grpc-ecosystem/go-grpc-middleware@v1.2.0/chain.go:81
google.golang.org/grpc.(*ClientConn).Invoke
google.golang.org/grpc@v1.29.1/call.go:35
github.com/moby/buildkit/api/services/control.(*controlClient).Solve
github.com/moby/buildkit/api/services/control/control.pb.go:1321
github.com/moby/buildkit/client.(*Client).solve.func2
github.com/moby/buildkit/client/solve.go:201
golang.org/x/sync/errgroup.(*Group).Go.func1
golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208/errgroup/errgroup.go:57
runtime.goexit
runtime/asm_amd64.s:1374
60355 0.8.0 buildctl —debug —addr kube-pod://buildkitd-priv-656b6f849d-sztsw build —frontend dockerfile.v0 —local context=/private/tmp/test —local dockerfile=/private/tmp/test
github.com/moby/buildkit/client.(*Client).solve.func2
github.com/moby/buildkit/client/solve.go:214
golang.org/x/sync/errgroup.(*Group).Go.func1
golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208/errgroup/errgroup.go:57
runtime.goexit
runtime/asm_amd64.s:1374
Dockerfile
The text was updated successfully, but these errors were encountered:
Источник
Solution for Docker issue failed to solve: rpc error: code = unknown desc
This post presents a solution to an error I encountered recently with Docker when trying to bring up a docker container using docker-compose.
The solution in the post helped me fix the Docker issue failed to solve: rpc error: code = unknown desc = failed to solve with frontend dockerfile v0
Docker Error Messages
If you have been having the same problem as me, you might get one of the following error messages from Docker:
docker failed to solve rpc error code = unknown desc
docker failed to solve with frontend dockerfile.v0
failed to solve: rpc error: code = unknown desc = failed to solve with frontend dockerfile v0
Docker build error: failed to solve with the frontend dockerfile
Problem
The problem with Docker was happening when I was trying to bring up docker using a docker-compose file. I was using a command similar to this one:
> sudo -E docker-compose -f docker-compose.yml -f docker-compose.local.yml up —build
The error message I got was as follows:
I tried a few variations to bring up the docker containers
> sudo docker-compose -f docker-compose.local.yml up -d
I got similar error messages from docker:
I also tried to clear out existing docker containers and images from the cache. > sudo docker system prune -a -f This did not work when I tried to rebuild docker containers as above.
The consistent error from each of the commands I tried that failed seemed to be not finding a docker file.
Docker Setup
You can skip to the solution here, as this section helps check if docker is correctly installed.
The first step you can try is to make sure you can actually run a вЂhello world’ docker image successfully. You can do this by executing the following command:
> docker run hello-world
The output of this command should be as follows:
As suggested in the output of the docker hello world example, you can try a more advanced docker test, which would be to run the latest ubuntu image and execute command via the bash terminal in ubuntu.
> docker run -it ubuntu bash
The output should be as follow, and should give you terminal access as the root user.
Solution
The solution is to explicitly give the name of the docker file in the docker-compose.yml. Change how you specify the location of your dockerfile from dockerfile: . to dockerfile: Dockerfile
This is an sample of the docker-compose file which did not work on Ubuntu 20.04 or Windows10, it only seems to work on MacOS only. As you can see, the dockerfile location is specified as a вЂ.’
The sample docker-compose file shown below is a working cross platform file, which works on MacOS, Ubuntu, Windows10.
As you can see, the line specifying the dockerfile has been changed from a dot вЂ.’ to the explicit file name, in my case, it was вЂDockerfile’.
This also works with lower and uppercase docker files as dockerfile: Dockerfile or dockerfile: dockerfile
Conclusion
The problem seemed to originate from the cross platform development and testing of the docker-compose script, between MacOS and Ubuntu / Window10 using version 3 of docker-compose. In the scenario of specifying the location of the dockerfile.
The original docker-compose file was built on MacOS, I was trying to use the same file but on Ubuntu 20.04. I believe this same problem can also occur if also trying to use docker-compose developed using MacOS on Windows10.
If you are using MacOS, then this docker-compose file will most likely run without any problems (if you do not have any other unrelated problems).
You can read more about how I have used docker in my other projects.
What can you do to improve your life as a programmer?
my article provides some ideas!
If this article helped you out, consider buying me a beer coffee?
Creating your first programming language is easier than you think,
. also looks great on your resume/cv.
Any comments? Send me a message on twitter @AyeshAlshukri or on Reddit /user/AyeshAlshukri/
Источник
failed to solve: rpc error #693
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apk add —no-cache bash curl jq docker && chmod a+x /tmp/.sh && mv /tmp/start-kafka.sh /tmp/broker-list.sh /tmp/create-topics.sh /tmp/versions.sh /usr/bin && sync && /tmp/download-kafka.sh && tar xfz /tmp/kafka_$-$.tgz -C /opt && rm /tmp/kafka_$-$.tgz && ln -s /opt/kafka_$-$ $ && rm /tmp/ && wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$/glibc-$.apk && apk add —no-cache —allow-untrusted glibc-$.apk && rm glibc-$.apk]: exit code: 2
The text was updated successfully, but these errors were encountered:
I found the same error. As a workaround I replaced in the dockerfile the line
I’m not sure about why. I’m using windows as a host and perhaps is related with this, but anyway with this workaround the solution worked in my environment
KAFKA_VERSION gets removed from the mirror after some time.
Don’t rebuild the container, just docker pull wurstmeister/kafka
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
failed running [/dev/.buildkit_qemu_emulator /bin/sh -c which ls]: exit code: 127 #464
First of all thank you for your work, buildx is very important to me
Today I found that I kept failing when trying to build an arm64 images on x86 machine, so I tried to make a simple enough image
Then I run buildx
I got the following error
Hope your reply
The text was updated successfully, but these errors were encountered:
docker run -it —rm —privileged tonistiigi/binfmt —install all to install qemu emulators
Hi,@tonistiigi Thanks for your reply, I have installed qemu emulators, but the problem still exists
what is the output of buildx ls after installing emulators? In the output in the first post emulators are not installed.
You get this error because you manually set —platform arm64 on buildx create while the node didn’t actually have arm64 support. You don’t need to set it unless you want to change the priority of nodes for multi-node build. If you don’t set it supported platforms are detected automatically. If you see arm64 in the list then all should be ok.
My buildx has been working normally on my server and Github Actions until they failed two days ago. I tried to reproduce it on the server and found that it also failed. This puzzled me. I did not upgrade docker and I did not change the code, and then I found that even if I build an image of RUN which ls , it will fail, so I think I need your team’s advice
Источник
I am working on this docker build
which fails on this line:
RUN --mount=type=ssh pip install --no-cache-dir -r requirements.txt
The terminal output shows all the requirements being installed but then I get the following failure:
failed to solve with frontend dockerfile.v0:
failed to solve with frontend gateway.v0:
rpc error: code = Unknown desc = failed to build LLB:
executor failed running [/bin/sh -c pip install --no-cache-dir -r requirements.txt]:
runc did not terminate sucessfully
I am on Windows 10 + WSL (v1) + Ubuntu 18.04
A colleague runs the same project on Mac OS and does not have any issues…
Any idea what’s going wrong? How do I debug it?
asked Jan 22, 2020 at 21:22
1
After a whole day of struggle, I fixed this by giving Docker more RAM (from 2Gb to 6Gb) and CPU (from 2 to 3)…
answered Jan 22, 2020 at 21:43
LeoLeo
4,9321 gold badge28 silver badges65 bronze badges
6
I had to close and re-open the Docker desktop app to fix the issue!
answered Oct 18, 2022 at 4:09
AminAmin
1,3351 gold badge17 silver badges29 bronze badges
I use Visual Studio, and when I updated it, I encountered this problem.
This post helped me: Debugging docker compose. VS can’t attach to containers
It turns out that there is a problem with the latest Visual Studio update and Docker Compose v2. Microsoft is going to release a fix for it soon.
For now, the best thing to do is to disable version 2 of Docker Compose, restart Docker and Visual Studio.
Command to check the current version of Docker Compose: docker-compose --version
Command to disable version 2: docker-compose disable-v2
Leo
4,9321 gold badge28 silver badges65 bronze badges
answered Nov 8, 2021 at 23:46
Roger OspinaRoger Ospina
3851 gold badge2 silver badges13 bronze badges
I have the same issue, in my case I try to run the command docker-compose up
for my nestjs application with the development part of my multi-stage build. So I fixed the error by adding the below line in my docker file :
RUN npm install glob rimraf
.- At the end I have something like this :
FROM node:14.0-alpine As development
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install glob rimraf
RUN npm install --only=development
COPY . .
RUN npm run build
I hope this answer will be helpfull.
answered Feb 19, 2022 at 21:49
Open
Issue created Aug 14, 2020 by FritschAuctores@FritschAuctores
Build Dockerimage fails
Summary
The build of the Dockerimage fails.
Steps to reproduce
git clone https://gitlab.com/gitlab-org/gitlab-runner
git checkout tags/v13.2.2
make deps
make runner-and-helper-bin-host
make package-deb-arch
make release_docker_images
Actual behavior
The build fails
Expected behavior
Build the image without an error
Relevant logs and/or screenshots
root@60b294056b13:/b# git clone https://gitlab.com/gitlab-org/gitlab-runner
Cloning into 'gitlab-runner'...
warning: redirecting to https://gitlab.com/gitlab-org/gitlab-runner.git/
remote: Enumerating objects: 10024, done.
remote: Counting objects: 100% (10024/10024), done.
remote: Compressing objects: 100% (2422/2422), done.
remote: Total 84727 (delta 8693), reused 7813 (delta 7583), pack-reused 74703
Receiving objects: 100% (84727/84727), 148.52 MiB | 10.49 MiB/s, done.
Resolving deltas: 100% (45687/45687), done.
root@60b294056b13:/b# cd gitlab-runner/
root@60b294056b13:/b/gitlab-runner# git checkout tags/v13.2.2
Note: switching to 'tags/v13.2.2'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at a998cacdc Update CHANGELOG for v13.2.2
root@60b294056b13:/b/gitlab-runner# make deps
go get github.com/mitchellh/gox
# Installing "https://github.com/vektra/mockery/releases/download/v1.1.0/mockery_1.1.0_Linux_x86_64.tar.gz" as .tmp/mockery-1.1.0
root@60b294056b13:/b/gitlab-runner# make runner-and-helper-bin-host
# Building gitlab-runner in version 13.2.2 for host platform
make runner-bin BUILD_PLATFORMS="-osarch=linux/amd64"
make[1]: Entering directory '/b/gitlab-runner'
go get github.com/mitchellh/gox
# Building gitlab-runner in version 13.2.2 for -osarch=linux/amd64
gox -osarch=linux/amd64
-ldflags "-X gitlab.com/gitlab-org/gitlab-runner/common.NAME=gitlab-runner -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=13.2.2 -X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=a998cacd -X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=2020-08-14T12:40:05+0000 -X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH= -s -w"
-output="out/binaries/gitlab-runner-{{.OS}}-{{.Arch}}"
gitlab.com/gitlab-org/gitlab-runner
Number of parallel builds: 6
--> linux/amd64: gitlab.com/gitlab-org/gitlab-runner
make[1]: Leaving directory '/b/gitlab-runner'
cp -f "out/binaries/gitlab-runner-linux-amd64" out/binaries/gitlab-runner
go get github.com/mitchellh/gox
gox -osarch=linux/amd64 -ldflags "-X gitlab.com/gitlab-org/gitlab-runner/common.NAME=gitlab-runner -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=13.2.2 -X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=a998cacd -X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=2020-08-14T12:40:05+0000 -X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH= -s -w" -output=out/binaries/gitlab-runner-helper/gitlab-runner-helper.x86_64 gitlab.com/gitlab-org/gitlab-runner/apps/gitlab-runner-helper
Number of parallel builds: 6
--> linux/amd64: gitlab.com/gitlab-org/gitlab-runner/apps/gitlab-runner-helper
Building helper image for: linux/amd64
docker-buildx
Successfully created context "docker-buildx"
buildx-builder
[+] Building 12.1s (12/12) FINISHED
=> [internal] booting buildkit 2.3s
=> => pulling image moby/buildkit:buildx-stable-1 1.6s
=> => creating container buildx_buildkit_buildx-builder0 0.7s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 615B 0.0s
=> [internal] load metadata for docker.io/library/alpine:3.12.0 3.3s
=> [1/6] FROM docker.io/library/alpine:3.12.0@sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321 2.9s
=> => resolve docker.io/library/alpine:3.12.0@sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321 0.0s
=> => sha256:df20fa9351a15782c64e6dddb2d4a6f50bf6d3688060a34c4014b0d9a752eb4c 2.80MB / 2.80MB 1.5s
=> => sha256:a24bb4013296f61e89ba57005a7b3e52274d8edd3ae2077d04395f806b63d83e 1.51kB / 1.51kB 0.0s
=> => sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321 1.64kB / 1.64kB 0.0s
=> => sha256:a15790640a6690aa1730c38cf0a440e2aa44aaca9b0e8931a9f2b0d7cc90fd65 528B / 528B 0.0s
=> => unpacking docker.io/library/alpine:3.12.0@sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321 0.2s
=> [internal] load build context 0.3s
=> => transferring context: 17.46MB 0.2s
=> [2/6] RUN apk add --no-cache bash ca-certificates git git-lfs miniperl && ln -s miniperl /usr/bin/perl 2.5s
=> [3/6] RUN git lfs install --skip-repo 0.2s
=> [4/6] COPY ./scripts/ /usr/bin 0.1s
=> [5/6] COPY ./gitlab-runner-helper /usr/bin/ 0.1s
=> [6/6] RUN echo 'hosts: files dns' >> /etc/nsswitch.conf 0.1s
=> exporting to client 0.6s
=> => sending tarball 0.5s
xz -f -9 out/helper-images/prebuilt-x86_64.tar
root@60b294056b13:/b/gitlab-runner# make package-deb-arch
Doing `require 'backports'` is deprecated and will not load any backport in the next major release.
Require just the needed backports instead, or 'backports/latest'.
Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag {:level=>:warn}
Created package {:path=>"out/deb/gitlab-runner_amd64.deb"}
root@60b294056b13:/b/gitlab-runner# make release_docker_images
# Releasing Docker images
amd64:
Building and loading image: dockerfiles/runner/ubuntu
docker-buildx
Successfully created context "docker-buildx"
buildx-builder
[+] Building 33.9s (9/11)
=> [internal] booting buildkit 2.4s
=> => pulling image moby/buildkit:buildx-stable-1 1.6s
=> => creating container buildx_buildkit_buildx-builder0 0.8s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 899B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:18.04 3.3s
=> [1/6] FROM docker.io/library/ubuntu:18.04@sha256:a61728f6128fb4a7a20efaa7597607ed6e69973ee9b9123e3b4fd28b7bba100b 6.5s
=> => resolve docker.io/library/ubuntu:18.04@sha256:a61728f6128fb4a7a20efaa7597607ed6e69973ee9b9123e3b4fd28b7bba100b 0.0s
=> => sha256:a61728f6128fb4a7a20efaa7597607ed6e69973ee9b9123e3b4fd28b7bba100b 1.42kB / 1.42kB 0.0s
=> => sha256:767eea1efb29ab7e215e1d97c8d758df5d587ca86e769a2dfb254c6b022895c3 1.15kB / 1.15kB 0.0s
=> => sha256:b6c12202c5ef07dc9eb8f9d9e71407064684ed70f8c4040b62679b7d30200840 161B / 161B 1.2s
=> => sha256:7595c8c21622ea8a8b9778972e26dbbe063f7a1c4b0a28a80a34ebb3d343b586 26.70MB / 26.70MB 3.7s
=> => sha256:2eb2d388e1a255c98029f40d6d7f8029fb13f1030abc8f11ccacbca686a8dc12 3.41kB / 3.41kB 0.0s
=> => sha256:d13af8ca898f36af68711cb67c345f65046a78ccd802453f4b129adf9205b1f8 35.36kB / 35.36kB 1.3s
=> => sha256:70799171ddba93a611490ba3557d782714b3f4da8963d49ac8726786ba8274a5 848B / 848B 1.2s
=> => unpacking docker.io/library/ubuntu:18.04@sha256:a61728f6128fb4a7a20efaa7597607ed6e69973ee9b9123e3b4fd28b7bba100b 1.6s
=> [internal] load build context 0.4s
=> => transferring context: 23.30MB 0.3s
=> [2/6] RUN apt-get update -y && apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl git wget tzdata openssh-client && rm -rf /va 21.1s
=> [3/6] COPY gitlab-runner_*.deb checksums-* install-deps install-gitlab-runner /tmp/ 0.3s
=> ERROR [4/6] RUN /tmp/install-deps "linux/amd64" "0.16.2" "1.2.2" "2.11.0" 0.2s
------
> [4/6] RUN /tmp/install-deps "linux/amd64" "0.16.2" "1.2.2" "2.11.0":
#8 0.115 tar: Archive is compressed. Use -j option
#8 0.115 tar: Error is not recoverable: exiting now
#8 0.115 dpkg-deb: error: tar subprocess returned error exit status 2
#8 0.116 dpkg: error processing archive /tmp/gitlab-runner_amd64.deb (--install):
#8 0.116 dpkg-deb --control subprocess returned error exit status 2
#8 0.124 Errors were encountered while processing:
#8 0.124 /tmp/gitlab-runner_amd64.deb
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c /tmp/install-deps "${TARGETPLATFORM}" "${DOCKER_MACHINE_VERSION}" "${DUMB_INIT_VERSION}" "${GIT_LFS_VERSION}"]: buildkit-runc did not terminate successfully
make: *** [Makefile:289: release_docker_images] Error 1
root@60b294056b13:/b/gitlab-runner#
Environment description
Ubuntu 20.04
Linux 60b294056b13 4.19.76-linuxkit #1 (closed) SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linu
Used GitLab Runner version
v13.2.2
williamdes opened this issue 2 years ago · comments
Behaviour
Steps to reproduce this issue
- Migrate to the new action and build on arm64 (this is the rollback commit, and it works using the old action: sudo-bot/nut-upsd@687a65a)
Expected behaviour
Build like with the old action
Actual behaviour
https://github.com/sudo-bot/nut-upsd/runs/2484264309?check_suite_focus=true#step:4:152
Configuration
- Repository URL (if public): https://github.com/sudo-bot/nut-upsd
- Build URL (if public): https://github.com/sudo-bot/nut-upsd/runs/2484264309?check_suite_focus=true#step:4:152
https://github.com/sudo-bot/nut-upsd/tree/v1.0.0/.github/workflows
Logs
Run PLATFORM="linux/arm64" make docker-build
# https://github.com/docker/buildx#building
docker buildx build
--tag nut-upsd
--platform linux/arm64
--build-arg VCS_REF=`git rev-parse HEAD`
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
--load
./docker
#1 [internal] load build definition from Dockerfile
#1 sha256:e3be6f97faa05f76aacd0dec23da473f200775f7e61dd7f3650a10df6fc06161
#1 transferring dockerfile: 2.23kB 0.0s done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:d7e0dd8fb0b7134e37d533d26b7500ae278ba45201fcd99c981c1716bf26cf26
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/alpine:3.13
#3 sha256:57159f54279e73ee28bf39616e5929169381ed3e0609a1806b5cdf70f3b9e07f
#3 ...
#4 [auth] library/alpine:pull token for registry-1.docker.io
#4 sha256:f406e9509edf09f90f4c4f2a794f0941124285190bce593e13b95c04c1154349
#4 DONE 0.0s
#3 [internal] load metadata for docker.io/library/alpine:3.13
#3 sha256:57159f54279e73ee28bf39616e5929169381ed3e0609a1806b5cdf70f3b9e07f
#3 DONE 1.2s
#7 [internal] load build context
#7 sha256:a67f6c3fc14c76b42c0413265a5db2970b1eae09bd8f60a30eb69f3cd2542a3f
#7 transferring context: 865B done
#7 DONE 0.0s
#5 [1/4] FROM docker.io/library/alpine:3.13@sha256:69e70a79f2d41ab5d637de98c1e0b055206ba40a8145e7bddb55ccc04e13cf8f
#5 sha256:47c271ba2f15c8b51f566bba4a31a85459d6a3c9ed72b6d2bad51ead57dfe443
#5 resolve docker.io/library/alpine:3.13@sha256:69e70a79f2d41ab5d637de98c1e0b055206ba40a8145e7bddb55ccc04e13cf8f done
#5 sha256:595b0fe564bb9444ebfe78288079a01ee6d7f666544028d5e96ba610f909ee43 2.71MB / 2.71MB 0.2s done
#5 extracting sha256:595b0fe564bb9444ebfe78288079a01ee6d7f666544028d5e96ba610f909ee43 0.1s done
#5 DONE 0.3s
#6 [2/4] RUN set -ex; apk add --update --no-cache openssh-client libusb-compat ; apk add --update --no-cache --virtual .build-deps libusb-compat-dev build-base ; cd /tmp; printf '%s nut-2.7.4.tar.gzn' "980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7" > nut-2.7.4.tar.gz.sha256; wget https://www.networkupstools.org/source/2.7/nut-2.7.4.tar.gz; tar xfz nut-2.7.4.tar.gz; sha256sum -c -w nut-2.7.4.tar.gz.sha256; cd nut-2.7.4 ; ./configure --prefix=/usr --sysconfdir=/etc/nut --disable-dependency-tracking --enable-strip --disable-static --with-all=no --with-usb=yes --datadir=/usr/share/nut --with-drvpath=/usr/share/nut --with-statepath=/var/run/nut --with-user=nut --with-group=nut ; make install ; adduser -D -h /var/run/nut nut; chgrp -R nut /etc/nut; chmod -R o-rwx /etc/nut; install -d -m 750 -o nut -g nut /var/run/nut ; rm -rf /tmp/nut-2.7.4.tar.gz /tmp/nut-2.7.4.tar.gz.sha256 /tmp/nut-2.7.4; rm -rf /share/man/man5 /share/man/man8; apk del .build-deps
#6 sha256:23f1fba7b9b0768a15aacc12291ee08f93da5b509ff23f8c388dbbdf6b658f01
#6 0.101 + apk add --update --no-cache openssh-client libusb-compat
#6 0.149 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/aarch64/APKINDEX.tar.gz
#6 0.635 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/aarch64/APKINDEX.tar.gz
#6 1.363 (1/7) Installing libusb (1.0.24-r1)
#6 1.382 (2/7) Installing libusb-compat (0.1.5-r4)
#6 1.390 (3/7) Installing openssh-keygen (8.4_p1-r3)
#6 1.420 (4/7) Installing ncurses-terminfo-base (6.2_p20210109-r0)
#6 1.434 (5/7) Installing ncurses-libs (6.2_p20210109-r0)
#6 1.470 (6/7) Installing libedit (20191231.3.1-r1)
#6 1.489 (7/7) Installing openssh-client (8.4_p1-r3)
#6 1.653 Executing busybox-1.32.1-r6.trigger
#6 1.701 OK: 10 MiB in 21 packages
#6 1.787 + apk add --update --no-cache --virtual .build-deps libusb-compat-dev build-base
#6 1.833 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/aarch64/APKINDEX.tar.gz
#6 2.223 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/aarch64/APKINDEX.tar.gz
#6 2.851 (1/24) Installing pkgconf (1.7.3-r0)
#6 2.868 (2/24) Installing libusb-dev (1.0.24-r1)
#6 2.879 (3/24) Installing libusb-compat-dev (0.1.5-r4)
#6 2.888 (4/24) Installing libgcc (10.2.1_pre1-r3)
#6 2.901 (5/24) Installing libstdc++ (10.2.1_pre1-r3)
#6 2.976 (6/24) Installing binutils (2.35.2-r1)
#6 3.319 (7/24) Installing libmagic (5.39-r0)
#6 3.452 (8/24) Installing file (5.39-r0)
#6 3.460 (9/24) Installing libgomp (10.2.1_pre1-r3)
#6 3.482 (10/24) Installing libatomic (10.2.1_pre1-r3)
#6 3.490 (11/24) Installing libgphobos (10.2.1_pre1-r3)
#6 3.727 (12/24) Installing gmp (6.2.1-r0)
#6 3.761 (13/24) Installing isl22 (0.22-r0)
#6 3.853 (14/24) Installing mpfr4 (4.1.0-r0)
#6 3.887 (15/24) Installing mpc1 (1.2.0-r0)
#6 3.900 (16/24) Installing gcc (10.2.1_pre1-r3)
#6 7.281 (17/24) Installing musl-dev (1.2.2-r0)
#6 7.639 (18/24) Installing libc-dev (0.7.2-r3)
#6 7.646 (19/24) Installing g++ (10.2.1_pre1-r3)
#6 10.01 (20/24) Installing make (4.3-r0)
#6 10.03 (21/24) Installing fortify-headers (1.1-r0)
#6 10.04 (22/24) Installing patch (2.7.6-r6)
#6 10.06 (23/24) Installing build-base (0.5-r2)
#6 10.07 (24/24) Installing .build-deps (20210501.232304)
#6 10.07 Executing busybox-1.32.1-r6.trigger
#6 10.11 OK: 200 MiB in 45 packages
#6 10.20 + cd /tmp
#6 10.20 + printf '%s nut-2.7.4.tar.gzn' 980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7
#6 10.21 + wget https://www.networkupstools.org/source/2.7/nut-2.7.4.tar.gz
#6 10.54 Connecting to www.networkupstools.org (185.199.108.153:443)
#6 10.55 wget: error getting response: Connection reset by peer
#6 ERROR: executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c set -ex; apk add --update --no-cache openssh-client libusb-compat ; apk add --update --no-cache --virtual .build-deps libusb-compat-dev build-base ; cd /tmp; printf '%s nut-2.7.4.tar.gzn' "$NUT_SHA256" > nut-$NUT_VERSION.tar.gz.sha256; wget https://www.networkupstools.org/source/2.7/nut-$NUT_VERSION.tar.gz; tar xfz nut-$NUT_VERSION.tar.gz; sha256sum -c -w nut-$NUT_VERSION.tar.gz.sha256; cd nut-$NUT_VERSION ; ./configure --prefix=/usr --sysconfdir=/etc/nut --disable-dependency-tracking --enable-strip --disable-static --with-all=no --with-usb=yes --datadir=/usr/share/nut --with-drvpath=/usr/share/nut --with-statepath=/var/run/nut --with-user=nut --with-group=nut ; make install ; adduser -D -h /var/run/nut nut; chgrp -R nut /etc/nut; chmod -R o-rwx /etc/nut; install -d -m 750 -o nut -g nut /var/run/nut ; rm -rf /tmp/nut-$NUT_VERSION.tar.gz /tmp/nut-$NUT_VERSION.tar.gz.sha256 /tmp/nut-$NUT_VERSION; rm -rf /share/man/man5 /share/man/man8; apk del .build-deps]: exit code: 1
------
> [2/4] RUN set -ex; apk add --update --no-cache openssh-client libusb-compat ; apk add --update --no-cache --virtual .build-deps libusb-compat-dev build-base ; cd /tmp; printf '%s nut-2.7.4.tar.gzn' "980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7" > nut-2.7.4.tar.gz.sha256; wget https://www.networkupstools.org/source/2.7/nut-2.7.4.tar.gz; tar xfz nut-2.7.4.tar.gz; sha256sum -c -w nut-2.7.4.tar.gz.sha256; cd nut-2.7.4 ; ./configure --prefix=/usr --sysconfdir=/etc/nut --disable-dependency-tracking --enable-strip --disable-static --with-all=no --with-usb=yes --datadir=/usr/share/nut --with-drvpath=/usr/share/nut --with-statepath=/var/run/nut --with-user=nut --with-group=nut ; make install ; adduser -D -h /var/run/nut nut; chgrp -R nut /etc/nut; chmod -R o-rwx /etc/nut; install -d -m 750 -o nut -g nut /var/run/nut ; rm -rf /tmp/nut-2.7.4.tar.gz /tmp/nut-2.7.4.tar.gz.sha256 /tmp/nut-2.7.4; rm -rf /share/man/man5 /share/man/man8; apk del .build-deps:
------
Dockerfile:31
--------------------
30 |
31 | >>> RUN set -ex;
32 | >>> # run dependencies
33 | >>> apk add --update --no-cache
34 | >>> openssh-client
35 | >>> libusb-compat
36 | >>> ;
37 | >>> # build dependencies
38 | >>> apk add --update --no-cache --virtual .build-deps
39 | >>> libusb-compat-dev
40 | >>> build-base
41 | >>> ;
42 | >>> # download and extract
43 | >>> cd /tmp;
44 | >>> printf '%s nut-2.7.4.tar.gzn' "$NUT_SHA256" > nut-$NUT_VERSION.tar.gz.sha256;
45 | >>> wget https://www.networkupstools.org/source/2.7/nut-$NUT_VERSION.tar.gz;
46 | >>> tar xfz nut-$NUT_VERSION.tar.gz;
47 | >>> sha256sum -c -w nut-$NUT_VERSION.tar.gz.sha256;
48 | >>> cd nut-$NUT_VERSION
49 | >>> ;
50 | >>> # build
51 | >>> ./configure
52 | >>> --prefix=/usr
53 | >>> --sysconfdir=/etc/nut
54 | >>> --disable-dependency-tracking
55 | >>> --enable-strip
56 | >>> --disable-static
57 | >>> --with-all=no
58 | >>> --with-usb=yes
59 | >>> --datadir=/usr/share/nut
60 | >>> --with-drvpath=/usr/share/nut
61 | >>> --with-statepath=/var/run/nut
62 | >>> --with-user=nut
63 | >>> --with-group=nut
64 | >>> ;
65 | >>> # install
66 | >>> make install
67 | >>> ;
68 | >>> # create nut user
69 | >>> adduser -D -h /var/run/nut nut;
70 | >>> chgrp -R nut /etc/nut;
71 | >>> chmod -R o-rwx /etc/nut;
72 | >>> install -d -m 750 -o nut -g nut /var/run/nut
73 | >>> ;
74 | >>> # cleanup
75 | >>> rm -rf /tmp/nut-$NUT_VERSION.tar.gz /tmp/nut-$NUT_VERSION.tar.gz.sha256 /tmp/nut-$NUT_VERSION;
76 | >>> rm -rf /share/man/man5 /share/man/man8;
77 | >>> apk del .build-deps
78 |
--------------------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c set -ex; apk add --update --no-cache openssh-client libusb-compat ; apk add --update --no-cache --virtual .build-deps libusb-compat-dev build-base ; cd /tmp; printf '%s nut-2.7.4.tar.gzn' "$NUT_SHA256" > nut-$NUT_VERSION.tar.gz.sha256; wget https://www.networkupstools.org/source/2.7/nut-$NUT_VERSION.tar.gz; tar xfz nut-$NUT_VERSION.tar.gz; sha256sum -c -w nut-$NUT_VERSION.tar.gz.sha256; cd nut-$NUT_VERSION ; ./configure --prefix=/usr --sysconfdir=/etc/nut --disable-dependency-tracking --enable-strip --disable-static --with-all=no --with-usb=yes --datadir=/usr/share/nut --with-drvpath=/usr/share/nut --with-statepath=/var/run/nut --with-user=nut --with-group=nut ; make install ; adduser -D -h /var/run/nut nut; chgrp -R nut /etc/nut; chmod -R o-rwx /etc/nut; install -d -m 750 -o nut -g nut /var/run/nut ; rm -rf /tmp/nut-$NUT_VERSION.tar.gz /tmp/nut-$NUT_VERSION.tar.gz.sha256 /tmp/nut-$NUT_VERSION; rm -rf /share/man/man5 /share/man/man8; apk del .build-deps]: exit code: 1
make: *** [Makefile:9: docker-build] Error 1
Error: Process completed with exit code 2.
@williamdes As you can see in your logs:
...
Platforms: linux/amd64, linux/386
...
linux/arm64
is not available. You have to install QEMU static binaries:
- name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Install docker buildx uses: docker/setup-buildx-action@v1
Thank you !
Indeed, I missed that
Sorry for the noise
When I build docker image for my dotnet app (ASP.NET Core 3.1) I’m experiencing network errors when running dotnet restore
(build output at the end of the post).
I’m running build from Docker Desktop for Mac on my device. The same build script runs perfectly on CI environment (GitHub Actions/ubuntu:latest) but on my device I’m getting this error. I can build project locally without any issue, and I’m not behind any VPN or proxy server nor have any DNS configuration regarding blocking nuget services.
Did someone else experienced same issues and know how to solve them? I’ve tried multiple things like changing my DNS, playing with docker settings but couldn’t solve. Any suggestions, help is appreciated
Docker engine config
{
"features": {
"buildkit": true
},
"experimental": false,
"builder": {
"gc": {
"enabled": true,
"defaultKeepStorage": "20GB"
}
},
"dns": [
"8.8.8.8",
"8.8.4.4"
]
}
Docker build output
> [...identity.api build 11/14] RUN dotnet restore "src/Api/...Identity/...Identity.csproj":
#34 1.905 Determining projects to restore...
#34 4.936 Restored /src...csproj (in 307 ms).
#34 16.63 Restored /src...csproj (in 12.02 sec).
#34 23.55 Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.azure.containers.tools.targets/index.json'.
...
#34 30.19 Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.entityframeworkcore.relational/index.json'.
#34 30.19 Resource temporarily unavailable
#34 33.57 /usr/share/dotnet/sdk/3.1.413/NuGet.targets(128,5): error : Failed to retrieve information about 'Serilog.Sinks.Console' from remote source 'https://api.nuget.org/v3-flatcontainer/serilog.sinks.console/index.json'. [/src...csproj]
#34 33.57 /usr/share/dotnet/sdk/3.1.413/NuGet.targets(128,5): error : Resource temporarily unavailable [/src...csproj]
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c dotnet restore "src...csproj"]: exit code: 1