$ apk add --no-cache bash
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/6) Installing pkgconf (1.3.10-r0)
(2/6) Installing ncurses-terminfo-base (6.0_p20171125-r0)
(3/6) Installing ncurses-terminfo (6.0_p20171125-r0)
ERROR: ncurses-terminfo-6.0_p20171125-r0: Protocol error
(4/6) Installing ncurses-libs (6.0_p20171125-r0)
(5/6) Installing readline (7.0.003-r0)
(6/6) Installing bash (4.4.19-r1)
ERROR: bash-4.4.19-r1: Protocol error
Executing busybox-1.27.2-r7.trigger
2 errors; 5 MiB in 15 packages
Been getting this for a few days now.
is there any update on this? Im too getting this error
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.167438ca.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.a2e6dac0.tar.gz: No such file or directory
2 errors; 11 distinct packages available
WARNING: Ignoring APKINDEX.167438ca.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.a2e6dac0.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
curl (missing):
required by: world[curl]
WARNING: Ignoring APKINDEX.167438ca.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.a2e6dac0.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
pcre (missing):
required by: world[pcre]
./mnt/install/install.sh: line 15: curl: not found
grep: unrecognized option: P
Also getting these errors.
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file or directory
CDN seems to be down again
+1
Had this issue, but realized that it was a defective docker bridge or something. Restarting the daemon fixed it for me and the troubleshooting process was working back from DNS resolution, routing, etc from the pertinent host.
adding RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositories fixed my issue
https://github.com/gliderlabs/docker-alpine/issues/279 is a similar issue from the past.
I would like to report that we are also seeing timeouts updating against dl-cdn.alpinelinux.org.
I have sidestepped the issue by adding references to one of the mirrors in our Dockerfile.
Hello,
Is there any fix available for this? I'm getting same error especially in APAC region.
Step 1/14 : FROM openjdk:8u151-jdk-alpine3.7
---> 224765a6bdbe
Step 2/14 : RUN apk add --no-cache bash
---> Running in 9f36177aa798
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/6) Installing pkgconf (1.3.10-r0)
(2/6) Installing ncurses-terminfo-base (6.0_p20171125-r0)
ERROR: ncurses-terminfo-base-6.0_p20171125-r0: Protocol error
(3/6) Installing ncurses-terminfo (6.0_p20171125-r0)
(4/6) Installing ncurses-libs (6.0_p20171125-r0)
(5/6) Installing readline (7.0.003-r0)
(6/6) Installing bash (4.4.19-r1)
ERROR: bash-4.4.19-r1: Protocol error
Executing busybox-1.27.2-r7.trigger
2 errors; 107 MiB in 55 packages
The command '/bin/sh -c apk add --no-cache bash' returned a non-zero code: 2
@prawen
RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositories
fixed my issue before your $ apk add --no-cache bash
Had the same error trying to build an alpine-sdk docker using Docker Windows 10. Checked the status of the server, and the server was fine and reachable outside docker.
Restarting docker did the trick for me. Looking in the Docker log file it's clear that the DNS configuration was set incorrectly. So when seeing this error in a docker context, try to restart docker first.
After trying both the workarounds I'm still getting below error.
Step 1/15 : FROM openjdk:8u151-jdk-alpine3.7
---> 224765a6bdbe
Step 2/15 : RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/mainnhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositories
---> Using cache
---> 62d6f04e3f75
Step 3/15 : RUN apk add --no-cache bash
---> Running in 316074569bd7
fetch http://nl.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/5) Installing ncurses-terminfo-base (6.0_p20171125-r0)
(2/5) Installing ncurses-terminfo (6.0_p20171125-r0)
(3/5) Installing ncurses-libs (6.0_p20171125-r0)
ERROR: ncurses-terminfo-6.0_p20171125-r0: BAD signature
(4/5) Installing readline (6.3.008-r4)
(5/5) Installing bash (4.3.46-r5)
If you do not know what the reason is, then it is probably DNS
dig http://dl-cdn.alpinelinux.org
; <<>> DiG 9.10.3-P4-Ubuntu <<>> http://dl-cdn.alpinelinux.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 11102
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;http://dl-cdn.alpinelinux.org. IN A
;; AUTHORITY SECTION:
alpinelinux.org. 899 IN SOA ns1.alpinelinux.org. webmaster.alpinelinux.org. 20180406 1800 1800 3600 3600
;; Query time: 95 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu Apr 26 11:28:52 CEST 2018
;; MSG SIZE rcvd: 108
dig @ns1.alpinelinux.org dl-cdn.alpinelinux.org
; <<>> DiG 9.10.3-P4-Ubuntu <<>> @ns1.alpinelinux.org dl-cdn.alpinelinux.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29219
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;dl-cdn.alpinelinux.org. IN A
;; ANSWER SECTION:
dl-cdn.alpinelinux.org. 3600 IN CNAME global.prod.fastly.net.
;; Query time: 150 msec
;; SERVER: 74.117.189.114#53(74.117.189.114)
;; WHEN: Thu Apr 26 11:29:27 CEST 2018
;; MSG SIZE rcvd: 87
dig @ns1.alpinelinux.org global.prod.fastly.net
; <<>> DiG 9.10.3-P4-Ubuntu <<>> @ns1.alpinelinux.org global.prod.fastly.net
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 45878
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;global.prod.fastly.net. IN A
;; Query time: 151 msec
;; SERVER: 74.117.189.114#53(74.117.189.114)
;; WHEN: Thu Apr 26 11:29:40 CEST 2018
;; MSG SIZE rcvd: 51
dig @8.8.8.8 global.prod.fastly.net
; <<>> DiG 9.10.3-P4-Ubuntu <<>> @8.8.8.8 global.prod.fastly.net
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24521
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;global.prod.fastly.net. IN A
;; ANSWER SECTION:
global.prod.fastly.net. 29 IN A 151.101.0.249
global.prod.fastly.net. 29 IN A 151.101.64.249
global.prod.fastly.net. 29 IN A 151.101.128.249
global.prod.fastly.net. 29 IN A 151.101.192.249
;; Query time: 41 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Apr 26 11:29:52 CEST 2018
;; MSG SIZE rcvd: 115
It seems to be an issue with wget (or any other tool fetching data) not sending host header when requesting resources.
not sure what you mean. Here's the wireshark of apk requesting the APKINDEX.tar.gz

I hit the same error. Any more update?
RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositoriesdoes not work for me :-(
Running the echo command and it didn't seem to help. I ended up just restarting my laptop and that seemed to work.
Any others suggestions on working around this issue?
Not working for me any updates on this ,,
This is annoying
In my situation was wrong /etc/resolv.conf file.
Just check in a container
ping dl-cdn.alpinelinux.org
It's DNS issue you can solve it by using the following steps:
1) Find your DNS ip using below command
nmcli dev show | grep 'IP4.DNS'
IP4.DNS[1]: 192.168.0.1
2) Create a file in the desktop which name is deamon.json and file has below data:
{
"dns": ["192.168.0.1", "8.8.8.8"]
}
note: replace that ip "192.168.0.1" to your dns ip
3) Go that directory /etc/docker/ in your system and paste file deamon.json that you just created
4) Then restart your docker/your system, it will solve your issue.
Seems your docker can not go out of host machine. Maybe this can help:
iptables -t nat -A POSTROUTING ! -o docker0 -s 172.17.0.0/16 -j MASQUERADE
Please use docker run -e OR docker build --build-arg to pass http_proxy env variable required for apk package manager
@GaudamThiyagarajan solution worked for me
as pointed out by @azyata its can be a problem with the DNS settings
If you are performing apk add inside the container, below might be helpful
From docs.docker.com:
By default, a container inherits the DNS settings of the Docker daemon
including the /etc/hosts and /etc/resolv.conf
ping dl-cdn.alpinelinux.org
if it doesn't work
/etc/resolve.conf in host machine, try addingnameserver 8.8.8.8
then perform ping
ping dl-cdn.alpinelinux.org
if it works for you, then
sudo systemctl restart docker
^ This solved the problem for me.
I am also getting below error:
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz: IO ERROR
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz: IO ERROR
I'm behind a proxy and I experienced a similar error:
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.00740ba1.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.d8b2a6f4.tar.gz: No such file or directory
2 errors; 15 distinct packages available
I solved it by creating a daemon.json file in /etc/docker/
sudo nano /etc/docker/daemon.json
and inserting:
{
"bip": "192.168.1.5/24"
}
Restart docker and try again:
sudo systemctl daemon-reload
sudo systemctl restart docker
If I were to guess I'd say that docker bridge0 clash with the proxy in some way?
Dirty hack for resolving this without changing daemon settings:
RUN \
# DNS problem workaround
# https://github.com/gliderlabs/docker-alpine/issues/386
printf "nameserver 8.8.8.8\nnameserver 9.9.9.9\nnameserver 1.1.1.1" > /etc/resolv.conf \
\
&& apk add --no-cache bash
Notice that it only affect current layer, in other layers you should add this patch too if needed.
Also you can pass custom DNS server from the ARGs.
While building, using --network=host option solved fetching from CDN for me.
docker build -t sample --network=host .
$ # Results without --network option
$ docker build -t sample .
...
Step 4/18 : RUN apk add --no-cache --update ca-certificates curl ffmpeg git make rtmpdump tzdata
---> Running in 97d093634b58
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armhf/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armhf/APKINDEX.tar.gz: IO ERROR
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/armhf/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/community/armhf/APKINDEX.tar.gz: IO ERROR
ERROR: unsatisfiable constraints:
curl (missing):
required by: world[curl]
ffmpeg (missing):
required by: world[ffmpeg]
git (missing):
required by: world[git]
make (missing):
required by: world[make]
rtmpdump (missing):
required by: world[rtmpdump]
tzdata (missing):
required by: world[tzdata]
The command '/bin/sh -c apk add --no-cache --update ca-certificates curl ffmpeg git make rtmpdump tzdata' returned a non-zero code: 6
I got the above "IO ERROR WARNING" but I was able to curl(download) them from the host.
So I assumed that CDN wasn't down but something wrong about docker's network.
I set the networking mode as host for the RUN instructions during build by adding --network=host option and started to download. Hope this helps.
While building, using
--network=hostoption solved fetching from CDN for me.docker build -t sample --network=host .$ # Results without --network option $ docker build -t sample . ... Step 4/18 : RUN apk add --no-cache --update ca-certificates curl ffmpeg git make rtmpdump tzdata ---> Running in 97d093634b58 fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armhf/APKINDEX.tar.gz WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armhf/APKINDEX.tar.gz: IO ERROR ...I got the above "IO ERROR WARNING" but I was able to
curl(download) them from the host.
So I assumed that CDN wasn't down but something wrong about docker's network.
I believe this happens when MTU in the container differs from the MTU on the host. What happens is that Fastly filters out need-to-frag ICMP packets so Path MTU is broken on fastly (and dl-cdn.alpinelinux.org).
While building, using
**--network=host**option solved fetching from CDN for me.docker build -t sample --network=host .$ # Results without --network option $ docker build -t sample . ... Step 4/18 : RUN apk add --no-cache --update ca-certificates curl ffmpeg git make rtmpdump tzdata ---> Running in 97d093634b58 fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armhf/APKINDEX.tar.gz WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armhf/APKINDEX.tar.gz: IO ERROR fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/armhf/APKINDEX.tar.gz WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/community/armhf/APKINDEX.tar.gz: IO ERROR ERROR: unsatisfiable constraints: curl (missing): required by: world[curl] ffmpeg (missing): required by: world[ffmpeg] git (missing): required by: world[git] make (missing): required by: world[make] rtmpdump (missing): required by: world[rtmpdump] tzdata (missing): required by: world[tzdata] The command '/bin/sh -c apk add --no-cache --update ca-certificates curl ffmpeg git make rtmpdump tzdata' returned a non-zero code: 6I got the above "IO ERROR WARNING" but I was able to
curl(download) them from the host.
So I assumed that CDN wasn't down but something wrong about docker's network.I set the networking mode as
hostfor the RUN instructions during build by adding--network=hostoption and started to download. Hope this helps.* Docker: 18.06.3-ce * Base Image: Alpine Linux v3.10.3
This solved my problem to build my docker image. Thank you
Adding --network=host in the build command fixed my issue.
adding
RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositoriesfixed my issue
it is ok thinks
How to build behind a corporate firewall?
This works for me
RUN sed -i 's/dl-cdn/nl/' /etc/apk/repositories
I found that my corporate firewall wouldn't allow me to download via HTTP. Looking at https://mirrors.alpinelinux.org/ I found https://alpine.global.ssl.fastly.net/alpine to be my closest mirror. I replaced the default repositories by adding
RUN echo -e "https://alpine.global.ssl.fastly.net/alpine/v3.11/main\nhttps://alpine.global.ssl.fastly.net/alpine/v3.11/community\n" > /etc/apk/repositories
to switch to a mirror that supported HTTPS.
I tried most of the previous tips; however, only this one work for me.
output
............
a81de1c029c9 host host local
self-hosted gitlab related: changing image: docker:latest to image: docker:19.03.8 fixed this for me in our private gitlab build.
This works for me
RUN sed -i 's/dl-cdn/nl/' /etc/apk/repositories
Doesn't work here. I guess it also depends on what routers/network the traffic passes through. --network=host works though.
I had the same issue. I solved by putting proxy inside docker cointainer.
docker exec -it reports sh
export http_proxy=http://ipaddress:port/
export https_proxy=http://ipaddress:port/
apk add --update ttf-dejavu
It downloaded required library with 200 OK exit status
Update: I build the image on a different network (Digital Ocean's drop let) and worked. The problem was related to my local network configuration.
I'm having this issue in the middle of the pandemic with alpine!
I'm having this issue in the middle of the pandemic with alpine!
Fixed with setting the network to host:
docker build . --network=host
I've also had this same issue, which I could solve by adding --network=host to my docker build call. But I found it pretty weird because I remembered that I never needed this, at least not until a recent OS (linux) upgrade, and it was still working without this option on for a colleague.
So after a bit of looking around, I found that my docker0 and the br-* interfaces were down, they did not have an IP address. After restarting the docker daemon they came back up and everything started working again.
I've already noticed earlier that, since the upgrade, other virtual interfaces were brought down after a suspend (and not brought up on resume). This seems to be happening to docker too. So, if you experience this, check your docker network interfaces (e.g. with ifconfig or ip addr on linux) and if they are down, restart the docker daemon: (sudo systemctl restart docker on linux).
The issue can result from the by default configuration of firewalld (using nftables instead of iptables). I had experienced this issue until I performed the following workaround (https://github.com/docker/for-linux/issues/957). It consists of the modification of the /etc/firewalld/firewalld.conf.
Note 1: do not forget to declare the docker0 in the firewall rules.
Note 2: Docker and nftables
Fedora Wiki reads: _"Docker currently does not cooperate with the nftables backend. It currently side-steps firewalld by injecting its own rules in iptables ahead of firewalld's rules. However, with the nftables backend firewalld's rule will still be evaluated. Netfilter in the kernel will call iptables, then nftables for the same packet. This means firewalld/nftables is likely to drop the packet even if docker has iptables rules to ACCEPT."
update my server DNS to Google DNS 8.8.8.8 8.8.4.4 solve this for me
@mojtaba-eshghie you rule 馃憤
I'm behind a proxy and I experienced a similar error:
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/main: temporary error (try again later) WARNING: Ignoring APKINDEX.00740ba1.tar.gz: No such file or directory fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/community: temporary error (try again later) WARNING: Ignoring APKINDEX.d8b2a6f4.tar.gz: No such file or directory 2 errors; 15 distinct packages availableI solved it by creating a
daemon.jsonfile in/etc/docker/sudo nano /etc/docker/daemon.jsonand inserting:
{ "bip": "192.168.1.5/24" }Restart docker and try again:
sudo systemctl daemon-reload sudo systemctl restart dockerIf I were to guess I'd say that docker bridge0 clash with the proxy in some way?
Solved with this solution. Thanks!!!
This is wild. Repos constantly just break and anytime you have a new vm you need to troubleshoot all of this over again?
I found a few different solutions for this issue on CentOS8 from: https://stackoverflow.com/a/64240450/2971264
firewall-cmd --zone=public --add-masquerade --permanent
firewall-cmd --reload
Works
and so does changing the folling parameter in the conf file /etc/firewalld/firewalld.conf to:
FirewallBackend=iptables
and then so sudo service firewalld restart
I had disabled firewalld with no joy.
I restarted docker and the issue was fixed.
While building, using
--network=hostoption solved fetching from CDN for me.docker build -t sample --network=host .$ # Results without --network option $ docker build -t sample . ... Step 4/18 : RUN apk add --no-cache --update ca-certificates curl ffmpeg git make rtmpdump tzdata ---> Running in 97d093634b58 fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armhf/APKINDEX.tar.gz WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/main/armhf/APKINDEX.tar.gz: IO ERROR fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/armhf/APKINDEX.tar.gz WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.10/community/armhf/APKINDEX.tar.gz: IO ERROR ERROR: unsatisfiable constraints: curl (missing): required by: world[curl] ffmpeg (missing): required by: world[ffmpeg] git (missing): required by: world[git] make (missing): required by: world[make] rtmpdump (missing): required by: world[rtmpdump] tzdata (missing): required by: world[tzdata] The command '/bin/sh -c apk add --no-cache --update ca-certificates curl ffmpeg git make rtmpdump tzdata' returned a non-zero code: 6I got the above "IO ERROR WARNING" but I was able to
curl(download) them from the host.
So I assumed that CDN wasn't down but something wrong about docker's network.I set the networking mode as
hostfor the RUN instructions during build by adding--network=hostoption and started to download. Hope this helps.* Docker: 18.06.3-ce * Base Image: Alpine Linux v3.10.3
docker build -t sample --network=host . working for me, thank you very much
Guess you got docker dns issue
For me the issues was using trying to use buildkit with docker-compose COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build.
#25 0.598 + apk add --no-cache --virtual .build-deps autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c
#25 0.618 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
#25 5.623 fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
#25 5.623 WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz: temporary error (try again later)
#25 10.63 WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz: temporary error (try again later)
#25 10.63 ERROR: unsatisfiable constraints:
#25 10.63 autoconf (missing):
#25 10.63 required by: .build-deps-20201107.075102[autoconf]
After i just used a normal docker-compose build --parallel it worked fine again.
adding
RUN echo -e "http://nl.alpinelinux.org/alpine/v3.5/main\nhttp://nl.alpinelinux.org/alpine/v3.5/community" > /etc/apk/repositoriesfixed my issue
Kindof just repeated the command until it worked. Like this:
apk add --no-cache curl; while [ $? -ne 0 ]; do apk add --no-cache curl; done
Which is blasphemy I know, but desperate times calls for desperate measures.
Seems like the timeout is too short, they need to increase it a little bit.
pmtu +1
i can see messages
ICMP
In my case installing the latest libseccomp on my host fixed it. I had to download it manually on my latest raspbian as the latest version is not yet in the apt repos.
The accepted answer in this "askubuntu" thread helped me: https://askubuntu.com/questions/1263284/apt-update-throws-signature-error-in-ubuntu-20-04-container-on-arm
Packages for debian(-based): https://packages.debian.org/sid/libseccomp2
Just download the one that fits your architecture and install with dpkg (again: only debian based).
Example for raspbian:
wget http://ftp.de.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
In my case installing the latest libseccomp on my host fixed it. I had to download it manually on my latest raspbian as the latest version is not yet in the apt repos.
The accepted answer in this "askubuntu" thread helped me: https://askubuntu.com/questions/1263284/apt-update-throws-signature-error-in-ubuntu-20-04-container-on-armPackages for debian(-based): https://packages.debian.org/sid/libseccomp2
Just download the one that fits your architecture and install with dpkg (again: only debian based).
Example for raspbian:
wget http://ftp.de.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
Raspbian-user here. totally fixed it for me!
I have a similar error
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.10/main: temporary error (try again later)
Problem was that container not pick up dns settings properly even after i add daemon.json with
{ "dns": ["8.8.8.8"] }
I don't know why it don't update dns nameserver with that daemon.json but in my case i add
RUN echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
to Dockerfile before
RUN apk update
and it work for me
Just posting here in case somebody else lands here trough google and all of the above did not fix their problem.
On my raspberry Pi with docker i ran into the same issue yesterday:
RUN apk add --no-cache acl fcgi file gettext git;
Results in:
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/armv7/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/armv7/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/main: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.13/community: temporary error (try again later)
ERROR: unable to select packages:
acl (no such package):
required by: world[acl]
fcgi (no such package):
required by: world[fcgi]
file (no such package):
required by: world[file]
gettext (no such package):
required by: world[gettext]
git (no such package):
required by: world[git]
The command '/bin/sh -c apk add --no-cache acl fcgi file gettext git ;' returned a non-zero code: 5
My search eventually landed me on:
docker-library/php#1118
From which i took away two things:
Downgrading from alpine3.13 to alpine3.12 solved it for me.
Downgrading from alpine3.13 to alpine3.12 solved it for me.
had the same problem and with alpine 3.12 it works.
I had a similar issue, and ping 8.8.8.8 failed inside container with ping: clock_gettime(MONOTONIC) failed. Googling that lead to the seccomp issue, and if you don't want to update libseccomp, as in @kuemit anwer, you can use this as a temporary workaround:
docker run -it --security-opt seccomp=unconfined alpine
update my server DNS to Google DNS 8.8.8.8 8.8.4.4 solve this for me
Had the same problem with php 7.4 alpine image in Ubuntu inside Windows (WSL2). I was trying to install the imagick extension via pecl and kept getting "No releases available for package pecl.php.net/imagick" error. Changing the nameserver to google's 8.8.8.8 solved it for me. Thank you.
$ sudo vi /etc/resolv.conf # change nameserver to 8.8.8.8
same issue here, updating DNS resolver fixs it, but I used systemd config instead of directly modify /etc/resolv.conf (you might forget this line: This file is managed by man:systemd-resolved(8). Do not edit. 馃)
update your /etc/systemd/resolved.conf
add something like this:
[Resolve]
DNS=1.1.1.1 8.8.8.8
FallbackDNS=8.8.4.4
restart the service:
sudo service systemd-resolved restart
verify the dns revolver:
systemd-resolve --status | grep 'DNS Servers' -A2
Now try to run your commands again 馃惂
all Package on bintray has been moved
also also get this error for many years
In my case installing the latest libseccomp on my host fixed it. I had to download it manually on my latest raspbian as the latest version is not yet in the apt repos.
The accepted answer in this "askubuntu" thread helped me: https://askubuntu.com/questions/1263284/apt-update-throws-signature-error-in-ubuntu-20-04-container-on-armPackages for debian(-based): https://packages.debian.org/sid/libseccomp2
Just download the one that fits your architecture and install with dpkg (again: only debian based).
Example for raspbian:
wget http://ftp.de.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
This worked for me on raspberry pi. Many thanks
In my case installing the latest libseccomp on my host fixed it. I had to download it manually on my latest raspbian as the latest version is not yet in the apt repos.
The accepted answer in this "askubuntu" thread helped me: https://askubuntu.com/questions/1263284/apt-update-throws-signature-error-in-ubuntu-20-04-container-on-arm
Packages for debian(-based): https://packages.debian.org/sid/libseccomp2
Just download the one that fits your architecture and install with dpkg (again: only debian based).
Example for raspbian:
wget http://ftp.de.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1_armhf.debThis worked for me on raspberry pi. Many thanks
This is works for my Raspberry Pi 4B 1.4 version. Many Thanks!
Downgrading from alpine3.13 to alpine3.12 solved it for me.
had the same problem and with alpine 3.12 it works.
same with me, 3.13 DNS lookup error, 3.12 everything fine
I am using vagrant to provision my virtual machines containing docker.
I aslo faced up with this issue. After that I ran vagrant reboot, everything worked fine.
Replacing http to https in /etc/apk/repositories fix this issue for me
sed -i -e 's/http:/https:/' /etc/apk/repositories
Most helpful comment
+1
Had this issue, but realized that it was a defective docker bridge or something. Restarting the daemon fixed it for me and the troubleshooting process was working back from DNS resolution, routing, etc from the pertinent host.