Install Liunx through Hyper-V in Windows Server2016 Container

Source: Internet
Author: User
Tags docker registry docker machine

Windows Server2016 has been officially released for some time. It's understandable that native Docker support is a very big highlight of this release.

The installation of Windows Container has many tutorials on the internet, I do not have too many descriptions here, can refer to:

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

The image that Windows Container currently supports must be an image of the Windows kernel (including server Core/nano server), and some images are still in the test phase with more pits.

In the latest version of Docker for Windows, Windows container and Liunx are switched, but are currently only installed in the WINDOWS10 environment (if there are any other methods).

This article takes a look at installing Docker registry images in Windows 2016 as an example of how to install Docker through a VM in Hyper-V in Windows Server2016

1. Turn on the Hyper-V feature

First make sure that the Hyper-V feature is turned on. Do not introduce too much.

2. Set up a virtual switch

In the Hyper-V Manager interface, in the action Bar on the right, open the Virtual Switch manager

Create a new virtual network switch

The results I've built here are as follows:

Restart your computer

Docker-machine

Docker-machine is not installed by default and needs to be downloaded by itself

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

Rename to Docker-machine.exe after download

Create a Docker machine
    1. Enter the folder where Docker-machine.exe is located in the admin CMD environment
    2. The format of the Run command is as follows:

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

That corresponds to me here

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

And then it's waiting.

PS c:\windows\system32> docker-machine create-d hyperv--hyperv-virtual-switch "Dcoknat" VM8Running pre-create Check S ... 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 the Switch "Docknat" (manager1) Creating VHD (manager1) starting VM ... (Manager1) Waiting for host to start ... Waiting for machine to is running, this could 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 ... Setting Docker configuration on the remote daemon ... Checking connection to Docker ... Docker is up and running! Your Docker Client to the Docker Engine running on this virtual machine, Run:c:\program Files\docke R\docker\resouRces\bin\docker-machine.exe Env Vm8ps c:\windows\system32> 

Set the current host as the default Docker command to run the host, as prompted, we run the following command

docker-machine.exe env VM8

To run the command:@FOR /f "tokens=*" %i IN (‘docker-machine env vm8‘) DO @%i

When you are finished, run the command: docker version View host information

Installing registry

Install registry tutorial, I do not say in detail here, you can refer to:

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

At this point, we have completed the installation of the Linux version of Docker in Windows Server 2016.

I am also a beginner, stones, if there is a mistake, please correct me.

Install Liunx through Hyper-V in Windows Server2016 Container

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.