This is such a strange situation.
I'm trying to build an image, and apt-get update
fails.
Network works fine though. DNS is fine, I can even wget the same urls just fine!!
See terminal output :
❯ docker run -i -t python /bin/bash
root@e0264555b919:/# apt-get update
Err:1 http://deb.debian.org/debian bullseye InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://deb.debian.org/debian-security bullseye-security InRelease
Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian bullseye-updates InRelease
Temporary failure resolving 'deb.debian.org'
Reading package lists... Done
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@e0264555b919:/# wget http://deb.debian.org/debian/dists/bullseye-updates/InRelease
--2023-01-07 11:50:33-- http://deb.debian.org/debian/dists/bullseye-updates/InRelease
Resolving deb.debian.org (deb.debian.org)... 151.101.62.132, 2a04:4e42:f::644
Connecting to deb.debian.org (deb.debian.org)|151.101.62.132|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 44066 (43K)
Saving to: ‘InRelease’
InRelease 100%[==========================================>] 43.03K --.-KB/s in 0.01s
2023-01-07 11:50:33 (3.84 MB/s) - ‘InRelease’ saved [44066/44066]
root@e0264555b919:/# head InRelease
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Origin: Debian
Label: Debian
Suite: stable-updates
Version: 11-updates
Codename: bullseye-updates
Date: Sat, 07 Jan 2023 08:40:57 UTC
Valid-Until: Sat, 14 Jan 2023 08:40:57 UTC
root@e0264555b919:/# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1
root@e0264555b919:/#
Any idea on why it does that? I tried several debian based images, all the same issue!