代潇瑞博客

win7搭建docker解决的一些坑

| 点击次数:24186

windows下面安装docker并不顺利,特此记下遇到的一些坑,希望能帮助到遇到同样问题的朋友。


本机环境:win7 64位系统。


下载软件就不多说了,去官网下载就行。


安装环节注意事项

(1)全部勾选,如下图:


安装docker


(2)弹出提醒“您想安装这个设备软件吗?”的时候,将下面的复选框勾选,并点击安装,不然安装完毕后,在“控制面板\网络和 Internet\网络连接”中可能没有“VirtualBox Host-Only Network”网络。


安装docker设备安装


问题1:安装完成后,桌面会有3个图标,双击“Docker Quickstart Terminal”image.png,可能会出现以下(如图)报错。

docker快捷方式1

解决方案:这是因为在安装的时候没有勾选安装git,如果之前有装过git,那么“右键”快捷图标,修改为正确的路径即可,如下图所示:


docker快捷方式2


问题2:启动“Docker Quickstart Terminal”出现如下报错信息:

(default) Image cache directory does not exist, creating it at C:\Users\reson.dai\.docker\machine\cache...

(default) No default Boot2Docker ISO found locally, downloading the latest release...

(default) Latest release for github.com/boot2docker/boot2docker is v18.05.0-ce

(default) Downloading C:\Users\reson.dai\.docker\machine\cache\boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v18.05.0-ce/boot2docker.iso...


boot2docker


解决方案:国内访问github.com比较慢,可以用下载工具手动下载“https://github.com/boot2docker/boot2docker/releases/download/v18.05.0-ce/boot2docker.iso”,然后将下载好的boot2docker.iso文件放到C:\Users\reson.dai\.docker\machine\cache\目录下。


问题3:解决上面问题后,继续打开docker,可能会报如下错误:

(default) Creating VirtualBox VM...

(default) Creating SSH key...

(default) Starting the VM...

(default) Check network to re-create if needed...

(default) Windows might ask for the permission to create a network adapter. Some

times, such confirmation window is minimized in the taskbar.

(default) Found a new host-only adapter: "VirtualBox Host-Only Ethernet Adapter

#2"

(default) Windows might ask for the permission to configure a network adapter. S

ometimes, such confirmation window is minimized in the taskbar.

(default) Windows might ask for the permission to configure a dhcp server. Somet

imes, such confirmation window is minimized in the taskbar.


docker报错信息


解决方案:虚拟机未启动,也就是“Oracle VM VirtualBox”image.png


问题4:虚拟机启动的时候可能也会报错,请确认docker安装完成后有重启电脑,实在不行,在控制面板“添加/删除程序”卸载“Oracle VM VirtualBox”,安装一个“VirtualBox-4.3.12-93733-Win”版本的(在家里的电脑就是安装4.3.12才好,但是公司的电脑却很顺利,都是win7 64位)。


各个问题都解决后,启动vm,打开docker,可以看到已经成功了,如下图:


Oracle VM VirtualBox


安装docker成功


不同的pc环境,遇到的问题可能并不相同,只要坚持不放弃,最终一定都会成功的。

【相关推荐】

触屏版 | 电脑版

Copyright © 2013 代潇瑞博客手机版

QQ: 446673330

粤ICP备13071969号-1