How To Install IIS On a Windows Server Container

In this blog post, I’ll show you how I Install IIS 10 Web Server on a Windows Server Container.

Installation Guide

Installing IIS Server or any other rule on a Windows Container can only be done using PowerShell because GUI Interface and remote roots are not available to us on Containers.

Therefore, the need to know and perfect PowerShell Is essential and I can’t stress this point more.

Get Started

to get started, I’ll create a Windows container with windows server core 2016 using the docker command below:

docker run -it --name web01 microsoft/windowsservercore powershell.exe

In the container, I’ll use the cmdlet below to view all the IIS features available for Installation

Get-WindowsFeature web-*

To install IIS with the default components I’ll use the cmdlet below

Add-WindowsFeature web-server, web-webserver

Done, as you can see IIS was Installed successfully, the entire operation took less than 5 minutes.