docker-alpine
docker-alpine copied to clipboard
apk WARNING Ignoring APKINDEX No such file or directory
I see a few issues related to this but they're all making it more complex to replicate.
Just running the following gets the WARNING. Start from a "blank" host (no images loaded, no containers running)
docker run --rm -it alpine:3.4 apk info
output:
WARNING: Ignoring APKINDEX.5a59b88b.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.7c1f02d6.tar.gz: No such file or directory
musl
busybox
alpine-baselayout
alpine-keys
zlib
libcrypto1.0
libssl1.0
apk-tools
scanelf
musl-utils
libc-utils
Tested on both VMware Fusion and Docker4mac. I also get the same WARNING using alpine:3.3
doing apk update fixes the problem (updates the index).
Request: Improve the error message.
Please improve the message to be actionable, see http://blog.schlomo.schapiro.org/2015/04/warning-is-waste-of-my-time.html for rationale.
This worked for me:
In your DOCKERFILE (in this one order):
First: Remove cache and tmp files
RUN rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
Second: Update
RUN apk update
Error persists on alpine 3.7 -- JUST FOUND SOLUTION -- SEE BELOW
/ # apk update
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 fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/community: temporary error (try again later) WARNING: Ignoring APKINDEX.5022a8a2.tar.gz: No such file or directory 2 errors; 11 distinct packages available
Restarted docker (running on bare metal debian 9) -- no change. Updated to latest DNS/bind etc. -- no change. Cleared /tmp/* and /var/cache/apk/* as suggested -- no change. Tried changing /etc/apk/repositories to use "dl-4" instead of "dl-cdn" -- no change.
Tried apk --no-cache update -- gives this different error: fetch http://dl-4.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz ERROR: http://dl-4.alpinelinux.org/alpine/v3.7/main: temporary error (try again later) fetch http://dl-4.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz WARNING: Ignoring http://dl-4.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz: temporary error (try again later) fetch http://dl-4.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz ERROR: http://dl-4.alpinelinux.org/alpine/v3.7/community: temporary error (try again later) fetch http://dl-4.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz WARNING: Ignoring http://dl-4.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz: temporary error (try again later) 2 errors; 11 distinct packages available
on bare metal debian 9 host: /root # host dl-cdn.alpinelinux.org dl-cdn.alpinelinux.org is an alias for global.prod.fastly.net. global.prod.fastly.net has address 151.101.200.249
/root # host dl-4.alpinelinux.org dl-4.alpinelinux.org is an alias for nl3.alpinelinux.org. nl3.alpinelinux.org has address 147.75.32.21
but inside alpine:3.7 container: / # host dl-cdn.alpinelinux.org / # host dl-4.alpinelinux.org both timed out
Discovered problem is DJB-DNS running on bare metal host -- it needed to be told to respond to DNS queries coming from 172.x.y.z (the docker containers): /root # touch /service/dnscache/root/ip/172
I'm also having this issue with 3.7, but while building docker containers:
Step 2/28 : RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.7/main" > /etc/apk/repositories
---> Using cache
---> d41c056fd55a
Step 3/28 : RUN apk update && apk upgrade --available && sync
---> Running in 3058e7cea18e
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
1 errors; 69 distinct packages available
The command '/bin/sh -c apk update && apk upgrade --available && sync' returned a non-zero code: 1
So? What solution for this problem?
touch /service/dnscache/root/ip/172 <----> No such file or directory
maybe your Docker DNS not work, try "docker run" with "--dns xxx.xxx.xxx.xxx ".
like
docker run --privileged --dns xxx.xxx.xxx.xxx --name testxxxx -dit gliderlabs/alpine
@dustinbarnes
I just had this issue, what fixed it for me is running the update as:
apk --update add --no-cache <yourPackage>
This is very-very annoying. I was able to ping/download from the repos through my browser, but could not install vim neither anything because of this error:
docker run -ti alpine /bin/sh
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
Digest: sha256:7df6db5aa61ae9480f52f0b3a06a140ab98d427f86d8d5de0bedab9b8df6b1c0
Status: Downloaded newer image for alpine:latest
/ # apk add --no-cache vim
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz: BAD signature
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
vim (missing):
required by: world[vim]
SOLUTION that worked for me:
apk add --no-cache --wait 10 vim <<--- Using `wait`
Dont use:
$ apk --update add --no-cache <yourPackage>
Because it will just ignore --no-cache and create cache files in /var/cache/apk anyways.
Re-opening this issue. It's obviously causing a lot of headaches still.
Where can we follow this issue? I have a headache too. Not even with docker. Just in a kvm. Same problems.
I got the same issue . But the strange thing is running with all proxy environment did not worked. For me it got resolved when I've not running behind proxy that is without using connecting to VPN, then it allowing in plain vanila network apk update works.
Seeing the same thing:
> docker run -it --rm alpine:3.7
Unable to find image 'alpine:3.7' locally
3.7: Pulling from library/alpine
c67f3896b22c: Pull complete
Digest: sha256:a52b4edb6240d1534d54ee488d7cf15b3778a5cfd0e4161d426c550487cddc5d
Status: Downloaded newer image for alpine:3.7
/ #
/ #
/ # apk update
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: BAD signature
WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/community: BAD signature
WARNING: Ignoring APKINDEX.5022a8a2.tar.gz: No such file or directory
2 errors; 13 distinct packages available
is there any other solutions? my alpine is 3.8
I don't htink this has anything to do with alpine or anything inside the container, it's simply a docker network problem. You can check it with docker run --rm alpine:3.8 ping 8.8.8.8
For me this is working on 5 of 6 100% identicaly provisioned nodes but not on the 6th.
For me it was an issue with Docker and DNS config, therefore "ping 8.8.8.8" worked fine while "ping dl-cdn.alpinelinux.org" did not. I solved it by copying a docker config specific to our company intranet, but something generic like this could work for others
This worked for me:
In your DOCKERFILE (in this one order):
First: Remove cache and tmp files
RUN rm -rf /var/cache/apk/* && \ rm -rf /tmp/*Second: Update
RUN apk update
Tks this worked for me.
Error :
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.8/main: IO ERROR WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory
This worked for me:
In your DOCKERFILE (in this one order):
First: Remove cache and tmp files
RUN rm -rf /var/cache/apk/* && \ rm -rf /tmp/*Second: Update
RUN apk update
This WORKED for me as well.
I was facing following errors:- WARNING: Ignoring APKINDEX.adfa7ceb.tar.gz: No such file or directory WARNING: Ignoring APKINDEX.efaa1f73.tar.gz: No such file or directory
Thanks for the solution.
You can use: docker run -e OR docker build --build-arg to pass http_proxy env variable required for apk package manager
This worked for me:
In your DOCKERFILE (in this one order):
First: Remove cache and tmp files
RUN rm -rf /var/cache/apk/* && \ rm -rf /tmp/*Second: Update
RUN apk update
I can confirm this solution worked for me as well in my Dockerfile in a custom build.
on bare metal, I think this will solve the issue:
I was getting:
bare-metal-host:~# apk update fetch http://mirror.math.princeton.edu/pub/alpinelinux/armhf/APKINDEX.tar.gz ERROR: http://mirror.math.princeton.edu/pub/alpinelinux/: No such file or directory WARNING: Ignoring APKINDEX.bcf95d26.tar.gz: No such file or directory fetch http://mirror.math.princeton.edu/pub/alpinelinux/v3.8/main/armhf/APKINDEX.tar.gz fetch http://mirror.math.princeton.edu/pub/alpinelinux/v3.8/community/armhf/APKINDEX.tar.gz v3.8.4-46-gd19f2800a1 [http://mirror.math.princeton.edu/pub/alpinelinux/v3.8/main] v3.8.4-44-g70fa4e605a [http://mirror.math.princeton.edu/pub/alpinelinux/v3.8/community] 1 errors; 9337 distinct packages available
I solved this by setting my /etc/apk/repositories file as such:
#http://mirror.math.princeton.edu/pub/alpinelinux/ http://mirror.math.princeton.edu/pub/alpinelinux/v3.8/main http://mirror.math.princeton.edu/pub/alpinelinux/v3.8/community
error message is now gone
Had the same problem, by fixing the /etc/resolv.conf and setting DNS it fixed!
I got the same issue. From docker container "ping 8.8.8.8" worked fine while "ping dl-cdn.alpinelinux.org" did not. I have check DNS configuration of other Host machines in my network and configured the same nameserver for docker also then after it works.
Solution:
Supplied DNS configuration while starting dockerd using --dns option.
If the machine has systemd service controller then you can find docker service file at the following location. Change ExecStart command in in docker.service file and restart docker service.
/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd --dns <nameserver-IP> -H fd:// --containerd=/run/containerd/containerd.sock
https://success.docker.com/article/how-do-i-set-the-docker-daemon-options
For anyone still struggling with this, I fixed this by having a VPN turned on whilst building the Docker image. No idea why it worked, apologies.
so these are the ideas, that came up so far...
-
apk update
-
RUN rm -rf /var/cache/apk/* &&
rm -rf /tmp/* -
restarted docker daemon
-
restarted docker daemon with explicid dns option in .service
-
apk --update ...
-
apk add --no-cache ...
-
apk --update add --no-cache ...
-
apk add --no-cache --wait 10 ...
sadly this didn't do the trick for me :( any news on this?
@agathebower
This command is not work.
$ sudo docker run --rm alpine ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
9 packets transmitted, 0 packets received, 100% packet loss
But, this command is work.
$ sudo docker run --rm --network=host alpine ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=54 time=4.240 ms
64 bytes from 8.8.8.8: seq=1 ttl=54 time=11.171 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 4.240/7.705/11.171 ms
Insert in Dockerfile next string:
RUN rm -rf /var/cache/apk/* &&
rm -rf /tmp/*
RUN apk update
Next restart docker
And next run build docker image.
thing that work for me 'docker build --network=host .'
sudo systemctl stop/start docker worked for me !