docker-alpine: 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
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 48
Commits related to this issue
- Fix 'Ignoring APKINDEX' warnings Updating to alpine 3.8 introduced some warnings during building the docker image, e.g.: 'WARNING: Ignoring APKINDEX.cd3a9dc2.tar.gz: No such file or directory' This ... — committed to namelessvoid/newman by namelessvoid 6 years ago
- Update Dockerfile Update Alpine package cache once. see gliderlabs/docker-alpine#207 — committed to openfoodfacts/openfoodfacts-server by hangy 6 years ago
- sq (#1448) * HR Content (#1346) HR Content * GA content (#1358) GA content * Delete index.html * Ro content (#1347) Ro content * open beauty facts specific strings (#1335) * R... — committed to openfoodfacts/openfoodfacts-server by teolemon 6 years ago
- Clear out apk files & update We're seeing a problem with APKINDEX. According to https://github.com/gliderlabs/docker-alpine/issues/207, this change should fix the issue. — committed to MightyNerdEric/alpine-nginx-phpfpm-pgsql by deleted user 5 years ago
- Fix warning in Docker compilation The APK installer seems to ignore --no-cache and create cache files anyways [1]. Removing the --no-cache removes the below warning. This did not increase the Docker ... — committed to heilaaks/snippy by heilaaks 5 years ago
doing
apk updatefixes the problem (updates the index).Request: Improve the error message.
thing that work for me ‘docker build –network=host .’
This worked for me:
In your DOCKERFILE (in this one order):
First: Remove cache and tmp files
Second: Update
RUN apk update@dustinbarnes
I just had this issue, what fixed it for me is running the update as:
apk --update add --no-cache <yourPackage>I’m also having this issue with 3.7, but while building docker containers:
sudo systemctl stop/start dockerworked for me !Re-opening this issue. It’s obviously causing a lot of headaches still.
Dont use:
Because it will just ignore --no-cache and create cache files in
/var/cache/apkanyways.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
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 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:
SOLUTION that worked for me:
@agathebower
This command is not work.
But, this command is work.
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“–network=host” option worked for me
I found this, and it’s solves the issue without killing the firewalld
I faced this issue today and it was caused by conflicting firewall rules added by firewalld.
And the error was gone.
Environment: Fedora 33 Beta, Docker CE 19.03.13
@kotauchisunsun and @lexyan solution using
--network=hostoption worked for me. Thanks.TL; DR
TS; DR
I noticed that the CDN itself isn’t the issue because downloading directly from the host succeeds.
So, maybe somehow the MTU might differ between the host’s network and Docker network, I assume.
this I try “–network=host” but failed, and this helps me resolve the issue (Fedora 36 here)
For me it was because of EOF conversion from Windows (notepad++) to Unix (LF)
Always edit file via Unix editor first
I finally solved it. I just turned on VPN.
Had the same problem, by fixing the
/etc/resolv.confand setting DNS it fixed!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
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.8For me this is working on 5 of 6 100% identicaly provisioned nodes but not on the 6th.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.