关于在Windows Server2016里如何通过Hyper-V安装Liunx Container的详解(图)


当前第2页 返回上一页

下载后重命名为 docker-machine.exe

创建Docker machine

  1. 在管理员cmd环境里进入到docker-machine.exe所在的文件夹

  2. 运行命令的格式如下:

1

docker-machine create -d hyperv --hyperv-virtual-switch "<NameOfVirtualSwitch>" <nameOfNode>

对应我这里就是

1

` docker-machine create -d hyperv --hyperv-virtual-switch "DockNAT" VM8 `

然后就是等待

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

PS C:\WINDOWS\system32>  docker-machine create -d hyperv --hyperv-virtual-switch "DcokNAT" VM8

Running pre-create checks...

Creating machine...

(manager1) Copying C:\Users\Vicky\.docker\machine\cache\boot2docker.iso to C:\Users\Vicky\.docker\machine\machines\manag

er1\boot2docker.iso...

(manager1) Creating SSH key...

(manager1) Creating VM8...

(manager1) Using switch "DockNAT"

(manager1) Creating VHD

(manager1) Starting VM...

(manager1) Waiting for host to start...

Waiting for machine to be running, this may take a few minutes...

Detecting operating system of created instance...

Waiting for SSH to be available...

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 your Docker Client to the Docker Engine running on this virtual machine, run: C:\Program Files\Doc

ker\Docker\Resources\bin\docker-machine.exe env VM8

PS C:\WINDOWS\system32>

把当前主机设置为默认docker命令运行的主机,根据提示,我们运行下面命令

docker-machine.exe env VM8

img

运行命令: @FOR /f "tokens=*" %i IN ('docker-machine env vm8') DO @%i

完成后,运行命令: docker version 查看主机信息

img

安装Registry

安装Registry的教程,我这里就不详细说了

至此,我们完成了 linux 版本的docker 在Windows Server 2016中的安装。

我也是初学,摸着石头过河,如有错误,请指正。

以上就是关于在Windows Server2016里如何通过Hyper-V安装Liunx Container的详解(图)的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

电脑提示Windows已遇到关键问题怎么办

Windows ping不通linux怎么办

Windows自带杀毒软件是什么?怎么关闭?

如何调整bios硬盘启动顺序

怎么取消桌面图标隐藏效果

Windows电脑开机直接进入系统

桌面文件在c盘哪个文件夹

Windows电脑开机时卡在主板界面

Windows不能启动提示可能是最近更改了硬件或软件

Windows如何实现定时运行python程序

更多相关阅读请进入《Windows》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...