据说 VirtualBox 的 NAT DNS 有点 bug

折腾 logspout,特别是 master branch,build Dockerfile 时可能会碰到下面的错误:

fetch http://alpine.gliderlabs.com/alpine/v3.1/main/x86_64/APKINDEX.tar.gz
ERROR: http://alpine.gliderlabs.com/alpine/v3.1/main: IO ERROR
WARNING: Ignoring APKINDEX.104533ab.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
  go (missing):
    required by: world[go]
  git (missing):
    required by: world[git]
  mercurial (missing):
    required by: world[mercurial]
Service 'logspout' failed to build: The command '/bin/sh -c cd /src && ./build.sh "$(cat VERSION)-custom"' returned a non-zero code: 3

通常你会直接用浏览器或者 curl 来试前面访问错误的 URL,却发现能正常访问。然后你就郁闷了,因为上述错误发生在 docker build 过程中,还不好调试。

据说问题是 VirtualBox 的 NAT DNS 的一个 bug,解决办法是:

VBoxManage modifyvm <vm-name> --natdnsproxy1 off --natdnshostresolver1 off
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容