【问题标题】:Docker apt-get fails inside minikubeDocker apt-get 在 minikube 中失败
【发布时间】:2017-06-21 11:01:27
【问题描述】:

我正在尝试在 mac 上的 minikube 中构建一个 docker 映像进行测试,但是当我运行 apt-get update 时,我收到一堆无法获取消息。

Err http://repo.mysql.com jessie InRelease

Err http://repo.mysql.com jessie Release.gpg
  Unable to connect to repo.mysql.com:http:

Err http://httpredir.debian.org jessie InRelease

Err http://httpredir.debian.org jessie-updates InRelease

Err http://httpredir.debian.org jessie Release.gpg
  Cannot initiate the connection to httpredir.debian.org:80 (2001:41c8:1000:21::21:35). - connect (101: Network is unreachable) [IP: 2001:41c8:1000:21::21:35 80]
Err http://httpredir.debian.org jessie-updates Release.gpg
  Cannot initiate the connection to httpredir.debian.org:80 (2001:41c8:1000:21::21:35). - connect (101: Network is unreachable) [IP: 2001:41c8:1000:21::21:35 80]
Err http://security.debian.org jessie/updates InRelease

Err http://security.debian.org jessie/updates Release.gpg
  Cannot initiate the connection to security.debian.org:80 (2610:148:1f10:3::73). - connect (101: Network is unreachable) [IP: 2610:148:1f10:3::73 80]
Reading package lists...
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/InRelease  

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/InRelease  

W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease  

W: Failed to fetch http://repo.mysql.com/apt/debian/dists/jessie/InRelease  

W: Failed to fetch http://repo.mysql.com/apt/debian/dists/jessie/Release.gpg  Unable to connect to repo.mysql.com:http:

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg  Cannot initiate the connection to httpredir.debian.org:80 (2001:41c8:1000:21::21:35). - connect (101: Network is unreachable) [IP: 2001:41c8:1000:21::21:35 80]

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/Release.gpg  Cannot initiate the connection to httpredir.debian.org:80 (2001:41c8:1000:21::21:35). - connect (101: Network is unreachable) [IP: 2001:41c8:1000:21::21:35 80]

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg  Cannot initiate the connection to security.debian.org:80 (2610:148:1f10:3::73). - connect (101: Network is unreachable) [IP: 2610:148:1f10:3::73 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.

但是,当我在主机上构建相同的映像时,它可以正常工作。 我在启动 minikube 时是否错过了阻止这些网站的网络设置?

要启动 minikube,我运行 minikube start --vm-driver=xhyve

【问题讨论】:

    标签: macos docker debian apt minikube


    【解决方案1】:

    为避免重新构建 docker 镜像,您可以将本地机器上构建的镜像传输到 minikube VM 中:

    docker save <image> | minikube ssh docker load
    

    发件人:https://twitter.com/markoluksa/status/828996606477422592

    【讨论】:

      【解决方案2】:

      原来是 xhyve 驱动程序。当我切换到使用 virtualbox 时,一切都很好。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-06-23
        • 2016-01-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-07-12
        • 2019-08-28
        相关资源
        最近更新 更多