我在Visual Studio 2019中有一个项目。我想学习Docker,并尝试将我的两个web应用程序部署在一起。
当我使用命令" Docker -machine create -d hyperv --hyperv- virtual -switch "stationext“myvm1”Docker创建虚拟机时。我可以在Hyper-V管理器中看到它。但是这个虚拟机使用的是Linux。
如何在板载Windows下通过"docker-machine create“命令创建虚拟机?
创建日志
PS C:\WINDOWS\system32> docker-machine create -d hyperv --hyperv-virtual-switch "stationext" myvm3
Running pre-create checks...
Creating machine...
(myvm3) Copying C:\Users\Sergii\.docker\machine\cache\boot2docker.iso to C:\Users\Sergii\.docker\machine\machines\myvm3\boot2docker.iso...
(myvm3) Creating SSH key...
(myvm3) Creating VM...
(myvm3) Using switch "stationext"
(myvm3) Creating VHD
(myvm3) Starting VM...
(myvm3) 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\Docker\Docker\Resources\bin\docker-machine.exe env myvm3发布于 2019-04-26 03:22:22
我认为行为是意料之中的,不知道你在哪里看到你将启动windows OS容器,正如你在他们的git上看到的那样,boot2docker是Linux:
https://github.com/boot2docker/boot2docker#readme
同时,您可以看到,为了支持Docker for Windows,这项功能已被弃用。为了在docker上运行windows主机,我认为你应该看看这个:
https://stackoverflow.com/questions/55854083
复制相似问题