Windows Container on Azure

Source: Internet
Author: User

Windows Container on Azure


Note:microsoft Azure does not support hyper-V containers. To complete Hyper-V Container exercises, you need an on-prem Container host.


Use Portal Create WS2016 Core with Containers TP4, step does not repeat.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7C/CC/wKiom1bYAmSyxj2zAAEZuGThSc4293.png "/>

After the virtual machine is created, use the PowerShell command to enter the PowerShell session

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7C/CB/wKioL1bYAt6Swb5xAABlyqUYZ-s830.png "/>

to verify that the Windows Server Core OS image is already installed, use the get-container image command

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7C/CC/wKiom1bYAmSBKzeFAAAytw_QPeY610.png "/>

Use New-container command to create a new name for the Tp4demo of the Windows Container , and connect the container to the VM Switch Default Virtual Switch .

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7C/CC/wKioL1bYAt-j4qqQAABhmbzhOsE343.png "/>

To start a container using the Start-container command

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7C/CC/wKiom1bYAmXBb-M7AAAu7raiscc552.png "/>

Use the enter-pssession command to connect to the container,install-windows the Feature command , and install IIS in the container role

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7C/CC/wKioL1bYAt_TtVbZAACFR3AcWeE590.png "/>

Exit, Stop Container

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7C/CC/wKiom1bYAmWDvCQRAAAndXcTHWQ385.png "/>

Create a new container that contains IIS and publish

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7C/CC/wKioL1bYAuCwIM-xAABARTNrqes582.png "/>

Create a new container to mirror from the Windowsservercoreiis container.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7C/CC/wKiom1bYAmbwi0z1AAA89jPQki0630.png "/>

Start IIS Container

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7C/CC/wKioL1bYAuDgyyDBAAB7RIQEInc679.png "/>

Configure the network to view the IP address of the container

Invoke-command-containername IIS {ipconfig}

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7C/CC/wKiom1bYAmaQvinFAADOWvwCWT4627.png "/>

Creating NAT Port Mappings

if (! ( get-netnatstaticmapping | where { $_. Externalport -eq 80 "Containernat" 0.0 0.0-internalipaddress 172.16 0.2-internalport 80- Externalport 80

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7C/CC/wKioL1bYAuHQqTqiAACtfzvF1Ek951.png "/>

Configure firewall rules

If (! ( Get-netfirewallrule | where {$_. Name -eq"TCP80"}) {new-netfirewallrule-name "TCP80" -displayname "HTTP on tcp/80" -protocol tcp-localport -action allow-enabled True}

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7C/CC/wKioL1bYAuGyWKgVAADa8QrWxE0211.png "/>

Configuring the IIS Home page

Enter-pssession-containername Iis-runasadministrator

Del C:\inetpub\wwwroot\iisstart.htm

"Windows Server Container on Azure ! " > C:\inetpub\wwwroot\index.html

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/7C/CD/wKiom1bYAmfDCzXWAABfR4yjHBY482.png "/>


After you configure the endpoint for a VM, you can access the IIS container page through a browser.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7C/CD/wKiom1bYAmiw3SUsAAA0yAWqK-4520.png "/>

Windows Container on Azure

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.