Running Universal Dashboard in IIS, in a Docker Container.
1 min readMay 1, 2020
Here is a quick demo on how to run a Universal Dashboard IIS Site inside a Docker container.
Components
Dockerfile
- I use
mcr.microsoft.com/dotnet/framework/aspnet
as my starting image.
The tag depends on what host you are building, in my case it was a Windows Server 2016, so I used4.8-windowsservercore-ltsc2016
- After selecting the Image, we only need to ensure that Nuget is installed and download Universal Dashboard PowerShell Module.
Dashboard.ps1
Just a minimal starter dashboard for demo purposes.
dockerbuild.ps1
A small script that ties everything together:
- Builds Image
- Runs container
- Performs a simple smoke test (webrequest)
Demo
Get the source code from here
- Navigate to
/ud-docker
directory - Run
dockerbuild.ps
Use the-WindowsVersion
parameter to get the correct image tag with2016
(default) or2019
- A fresh Windows-IIS Image is built, with Universal Dashboard installed
- A container is spun up with a random port
- A test webrequest is run on the fresh container
💰 if you have a license for the Enterprise version, uncomment the copy license line in the Dockerfile
, and replace UniversalDashboard.Community
with UniversalDashboard