Home > Article > Operation and Maintenance > Detailed explanation on how to install Liunx Container through Hyper-V in Windows Server 2016 (picture)
Windows Server2016 has been officially released for some time. It is understandable that the support of native Docker is a very big highlight of this version.
Windows Container The currently supported image must be the Windows kernel image (including Server Core/Nano Server), and some images are also It is in the testing stage and has many pitfalls.
In the latest version of Docker for windows, switching between Windows container and Liunx is implemented, but currently it can only be installed in the windows10 environment (if there are other methods Please tell me).
This article takes installing the Docker Registry image in Windows 2016 as an example to explain how to install Docker through VM in Hyper-v in Windows Server 2016
First make sure that the Hyper-V function is turned on. Without giving too much introduction.
In the Hyper-v manager interface, in the operation bar on the right, open the virtual switch manager
Create a new virtual network switch
After I have built it here, the result is as follows:
Restart the computer
Docker-Machine is not installed by default, you need to download it yourself
http://github.com/docker/machine/releases
After downloading, rename it to docker-machine.exe
Enter the folder where docker-machine.exe is located in the administrator cmd environment
docker-machine create -d hyperv --hyperv-virtual-switch "<NameOfVirtualSwitch>" <nameOfNode>
` docker-machine create -d hyperv --hyperv-virtual-switch "DockNAT" VM8 `Then wait
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>Set the current host as the host where the default docker command runs. According to the prompts, we run the following command
docker-machine.exe env VM8
@FOR /f "tokens=*" %i IN ( 'docker-machine env vm8') DO @%i
docker version View host information
linux version of docker in Windows Server 2016 Install.
The above is the detailed content of Detailed explanation on how to install Liunx Container through Hyper-V in Windows Server 2016 (picture). For more information, please follow other related articles on the PHP Chinese website!