gpt4 book ai didi

docker - 无法启动 Docker 1.9.1

转载 作者:行者123 更新时间:2023-12-02 18:32:47 25 4
gpt4 key购买 nike

我是一个关于 docker 的新手。
今天早上我刚刚下载并安装了docker 1.9.1到我的电脑(操作系统:windows)

安装后,我运行 'Docker Quickstart Terminal' 但它失败了
控制台保持打印是这样的:

Machine default already exists in VirtualBox.
Starting machine default...
(default) Starting VM...
Machine "default" was started.
Started machines may have new IP addresses. You may need to re-run the `docker-m
achine env` command.
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): Regeneratin
g TLS certificates
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Setting environment variables for machine default...
Looks like something went wrong... Press any key to continue...

我试图删除虚拟机并重新创建它,但问题仍然存在
Creating Machine default...
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\mcthanh\.docker\machine\cache\boot2docker.iso to C:\U
sers\mcthanh\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting VM...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: C:\Program Files\Docker Toolb
ox\docker-machine.exe env default
Setting environment variables for machine default...
Looks like something went wrong... Press any key to continue...

你有这方面的经验吗?
非常感谢您的帮助!!!

最佳答案

在 sleep /唤醒周期之后,Windows 将 Host-Only 网络检测为“重复”并更改其 IP。之后,docker-machine(或 Quickstart 终端)不再工作。

可能是这个 VirtualBox bug 引起的(从 5 年前开始):所以 VirtualBox 似乎没有很快修复。这可能是一个 Windows 错误。

这应该是一个有效的解决方法:

  • 打开 VirtualBox
  • 转到文件 -> 首选项 -> 网络 -> 仅主机网络
  • Docker Toolbox 可能创建了第二个 Host-only 网络,可能命名为“VirtualBox Host-Only Ethernet Adapter #2”,双击
  • 将“IPv4 地址”从 192.168.99.1 更改为 192.168.99.2(您可能每次都必须增加/减少 IP)。但重要的是 IP 确实发生了变化。
  • 点击确定。如果 IP 已更改(应该已更改),系统将提示您输入“Windows Administrator OK”(或名称如何)。

  • 之后,docker-machine 和 Quickstart Terminal 应该可以工作了。

    关于docker - 无法启动 Docker 1.9.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34647602/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com