美文网首页
据说 VirtualBox 的 NAT DNS 有点 bug

据说 VirtualBox 的 NAT DNS 有点 bug

作者: 做个懂科学的憨人 | 来源:发表于2015-12-28 22:15 被阅读661次

折腾 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

相关文章

网友评论

      本文标题:据说 VirtualBox 的 NAT DNS 有点 bug

      本文链接:https://www.haomeiwen.com/subject/inzbhttx.html