Container DNS not able to resolve deb.debian.org
See original GitHub issueActual Behavior
When I try to update the packages inside a debian based container I’m getting a temporary DNS resolution error like below.
root@2b485cdbe552:/app# apt update
Err:1 http://deb.debian.org/debian buster InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://security.debian.org buster/updates InRelease
Temporary failure resolving 'security.debian.org'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
However, when I jump into the rancher-desktop
vm I’m able to resolve the dns name with no issues.
# cat /etc/*release
3.15.0
NAME="Rancher Desktop WSL Distro"
ID="rancher-desktop-wsl-distro"
PRETTY_NAME="Rancher Desktop WSL Distribution"
VERSION_ID="0.12.1"
BUILD_ID="8730372c4825de6bdbe04efbbb08926766c22f78"
HOME_URL="https://rancherdesktop.io/"
SUPPORT_URL="https://rancher-users.slack.com/channels/rancher-desktop"
BUG_REPORT_URL="https://github.com/rancher-sandbox/rancher-desktop-wsl-distro/issues/new"
# cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.17.224.1
#nameserver 8.8.8.8
# nslookup deb.debian.org
Server: 172.17.224.1
Address: 172.17.224.1:53
Non-authoritative answer:
deb.debian.org canonical name = debian.map.fastlydns.net
Name: debian.map.fastlydns.net
Address: 146.75.94.132
Non-authoritative answer:
deb.debian.org canonical name = debian.map.fastlydns.net
Name: debian.map.fastlydns.net
Address: 2a04:4e42:87::644
When I uncomment the extra nameserver 8.8.8.8 above and restart the container all works great like below.
root@5a58bae12bb5:/app# apt update
Get:1 http://security.debian.org buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://security.debian.org buster/updates/main amd64 Packages [399 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 Packages [10.7 MB]
Fetched 11.3 MB in 8s (1338 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Steps to Reproduce
docker run -it bitnami/python:3.8 bash
apt update
Result
Err:1 http://deb.debian.org/debian buster InRelease
Temporary failure resolving 'deb.debian.org'
Err:2 http://security.debian.org buster/updates InRelease
Temporary failure resolving 'security.debian.org'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Expected Behavior
If my container is using the same nameserver as my rancher-desktop VM and I can resolve the dns name, I expect the container to be able to resolve the same dns name.
Additional Information
No response
Rancher Desktop Version
1.0.1
Rancher Desktop K8s Version
1.23.3
Which container runtime are you using?
moby (docker cli)
What operating system are you using?
Windows
Operating System / Build Version
Windows 10 2004 19041.1415
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
No response
Windows User Only
N/A
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Docker Could not resolve 'deb.debian.org' - Stack Overflow
You should first check if you are able to resolve deb.debian.org from your host in which you are running docker.
Read more >Apt error: Temporary failure resolving 'deb.debian.org'
Apt is throwing a dns error. :( This is digitalocean's image, and I haven't done anything on it yet. (Other than changing the...
Read more >Docker problem Temporary failure resolving 'deb.debian.org'
Hi, Using OMV5 Trying to setup wyzecam-bridge docker. When running composer get this error. Building with native build.
Read more >Temporary failure resolving 'deb.debian.org' - Reddit
I'm getting 3 error messages just like this one whenever I try to use the apt-get update command. I am a beginner using...
Read more >Unable to install any package in debian OS
Error which occurred was coz of not resolving sources list while using ... http://deb.debian.org/debian buster main contrib non-free deb-src ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I updated my Rancher Desktop to 1.1.0 and confirm this is no longer an issue for me. I appreciate everyone’s assistance with this.
@LongBeachHXC thanks for filing the issue & @ljani thanks for your contribution. Could you please let us know if you are facing network address collisions as per @ljani 's suggestion?