Public Repository

Last pushed: 15 days ago
Short Description
Nano Server + IIS. Updated on march 13, 2017. Version: 10.0.14393.1066
Full Description

Windows Container Based: microsoft/nanoserver. IIS rol added.

How to use:

Install docker on your OS (Windows 10, Windows Server 2016, Nano Server, etc.).
Once docker is installed, execute in elevated prompt (PowerShell 5, etc):
docker pull nanoserver/iis

To run docker just type:
docker run --name nanoiis -d -it -p 80:80 nanoserver/iis

Show base images:
docker images

Show running containers:
docker ps -a -f status=running

Show container IP:
docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" nanoiis

Show containerID:
docker inspect --format="{{.Id}}" nanoiis

Now you can access via browser using container IP Address (ex.: ). Use here container IP.

Access via powershell:
Enter-PSSession <type-here-containerID> -RunAsAdministrator

If you want container starts everytime docker service starts:
docker update --restart=always <type-here-containerID>

How to manage Nano Server via remote PS:

Show docker images.

docker images

Add Nano Server Container + IIS (image) .

docker pull nanoserver/iis

Create a Windows Docker Container for Nano Server.

docker run --name nano -d -it -p 80:80 nanoserver/iis

Show container running.

docker ps -a -f status=running

Get Nano Server Container IP Address.

docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" nano

Script to create a remote interactive session from host to Nano Server Container.

$container= docker inspect --format="{{.Id}}" nano
$sesion = New-PSSession -ContainerId $container -RunAsAdministrator

Samples of remote scripts to run into a Nano Server Container. (Windows Update).

Search of updates not installed. You can change "IsInstalled=0" for "IsInstalled=1" if you want to see updates installed.

$WinUpdate = {
$ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession
$result = $ci | Invoke-CimMethod -MethodName ScanForUpdates -Arguments @{SearchCriteria="IsInstalled=0";OnlineScan=$true}
Invoke-Command -Session $sesion -ScriptBlock $WinUpdate

Apply Windows Updates not installed.

$WinUpdate = {
$ci = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession
Invoke-CimMethod -InputObject $ci -MethodName ApplyApplicableUpdates
Invoke-Command -Session $sesion -ScriptBlock $WinUpdate

Nano Server is a Microsoft product. Terms of use and official image base:

Hope you enjoy it. Rate, comment and share it. Thanks...


Docker Pull Command

Comments (6)
15 days ago


Hello merel and thanks for comment. You have to use -Administrator flag as we descripted above. We tested and tried many times and ways to connect PS-Remote to Nano Server container but we could only connect that way. You can create a script to manage Nano Server from PowerShell as we did it. I'm going to give you a sample on description. Enjoy Nano Server - IIS Container.

22 days ago

Hi Guys,
I've downloaded and installed it and it's running on Windows 10 in HyperV.

I'm trying to connect to it using PS-Remote from the docker host. (Not using the -Administrator flag. As far as i can tell this should work right?

(I've set an admin password, added it to the trusted hosts on the client etc.)

The nano server writes to the event log that the DCom server failed when trying to connect with Error "5".

Question 1: Is this te proper place to ask about this issue?
Question 2: Where can i get support for solving this?

3 months ago

Have you considered adding the components?

4 months ago

Can you share the Dockerfile on GitHub?

Also I think you don't have EXPOSE statement, that's why I can't run the container in detached (-d) mode.

4 months ago

It will not work on Linux, because it's based on Windows image.

4 months ago

Has anyone testing this on Ubuntu 16.04 LTS?