Docker 无法解析“deb.debian.org"

Err:3 http://deb.debian.org/debian bookworm InRelease Could not connect to deb.debian.org:80 (151.101.110.132), connection timed out Err:4 http://deb.debian.org/debian bookworm-updates InRelease Unable to connect to deb.debian.org:80: Fetched 149 kB in 37s (3997 B/s) Reading package lists... W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease Could not connect to deb.debian.org:80 (151.101.110.132), connection timed out W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease Unable to connect to deb.debian.org:80: W: Some index files failed to download. They have been ignored, or old ones used instead.

  • DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jq 无法解析“deb.debian.org" 解决方法:
You should first check if you are able to resolve deb.debian.org from your host in which you are running docker. You can check that with nslookup deb.debian.org or dig deb.debian.org.

If you are not able to resolve the from host add nameserver 8.8.8.8 to your /etc/resolv.conf file and then try again. Docker copies nameservers from /etc/resolv.conf file.

Or you can set the nameserver by creating file /etc/docker/daemon.json

{
    "dns": ["8.8.8.8"]
}
then restart docker service:

$ service docker restart

zed
请先登录后发表评论
  • latest comments
  • 总共0条评论