Installing Liunx Container, server2016hyper-v via Hyper-V in Windows Server2016

Source: Internet
Author: User
Tags docker registry docker machine

Installing Liunx Container, server2016hyper-v via Hyper-V in Windows Server2016

Windows Server2016 has been officially released for some time. The support of native Docker is a big highlight of this version.

Windows Container has a lot of tutorials installed on the Internet. I have a lot of descriptions here. For details, refer:

https://docs.microsoft.com/zh-cn/virtualization/windowscontainers/quick-start/quick-start-windows-server

Currently, Windows Container supports images of the windows kernel (including Server Core/Nano Server). Some images are still in the test phase, with many pitfalls.

In the latest version of Docker for windows, Windows iner and Liunx are switched. Currently, windows container and Liunx can only be installed in Windows 10. (If you have other methods, see this article ).

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 Server2016

1. Enable the Hyper-V function.

First, make sure that the Hyper-V feature is enabled. I will not introduce it too much.

2. Set vswitches

On the Hyper-v Manager page, open the vswitch manager in the action bar on the right.

Create a vswitch

The created result is as follows:

Restart your computer

Docker-Machine

Docker-Machine is not installed by default. You need to download it yourself.

Http://github.com/docker/machine/releases

Rename the docker-machine.exe after download

Create a Docker machine

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

Corresponding to me here is

` 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" VM8Running pre-create checks...Creating machine...(manager1) Copying C:\Users\Vicky\.docker\machine\cache\boot2docker.iso to C:\Users\Vicky\.docker\machine\machines\manager1\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\Docker\Docker\Resources\bin\docker-machine.exe env VM8PS C:\WINDOWS\system32>

Set the current host as the default host for running docker commands. As prompted, run the following command:

docker-machine.exe env VM8

Run the following command:@FOR /f "tokens=*" %i IN ('docker-machine env vm8') DO @%i

After completion, run the following command:docker versionView host information

Install Registry

The Registry installation tutorial is not detailed here. For details, refer:

Http://www.cnblogs.com/lienhua34/p/4922130.html

So far, we have installed docker for linux in Windows Server 2016.

I am also a beginner. If you have any mistakes, please correct me.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.