小编Zee*_*lal的帖子

docker 镜像的 DNS 问题

我在我的 Ubuntu 主机中使用 docker,并想用一些开发包构建一个服装镜像。

我什么时候跑

docker run -it ubuntu apt-get update
Run Code Online (Sandbox Code Playgroud)

它不解析主机并在错误日志下方抛出

Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done        
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old …
Run Code Online (Sandbox Code Playgroud)

dns docker

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

dns ×1

docker ×1