首先,你的是win7、8还是win10
windows对docker兼容也是最近的事,所以win7、8的话,安装docker是要用工具箱的,不过官方给了下载。
国内话的可以通过,阿里镜像,或者清华镜像来下。
win10的话,官网有桌面版下载,docker desktop
win7、8中的安装、运行
先说明,我是在win7虚拟机下安装的docker,所以相对真机来说遇到点麻烦。
运行下载下来的DockerToolbox-18.03.0-ce.exe,把能装的都装上(懒人怕麻烦,,)
之后会得到三个快捷方式!
双击运行Docker Quickstart Terminal会自动为你安装docker,还要说明的问题如下:
1、virtual box是不能嵌套虚拟机的,而docker在win7下是要通过virtual box虚拟机来运行的,所以我们只能选择VMware
2、要确保VMware开启了虚拟化技术,
3、VMware网络要设置为桥接模式,
否则会遇到如下问题:
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\Test_01\.docker\machine\cache\boot2docker.iso to C:\U
sers\Test_01\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
Wrapper Docker Machine process exiting due to closed plugin server (read tcp 127
.0.0.1:49336->127.0.0.1:49335: wsarecv: An existing connection was forcibly clos
ed by the remote host.)
Error creating machine: Error in driver during machine creation: read tcp 127.0.
0.1:49336->127.0.0.1:49335: wsarecv: An existing connection was forcibly closed
by the remote host.
Looks like something went wrong in step ´Checking if machine default exists´...
Press any key to continue...
4、首次安装docker时需要最新的boot2docker.iso的问题
可以到GitHub找boot2docker.iso源用迅雷下下来,放到C:\Users\xxxxx\.docker\machine\cache\目录下,重新打开Docker Quickstart Terminal