A Windows container Dockerfile
Windows container images use Dockerfile commands in the same format as for Linux containers. The following Dockerfile will download, install, and enable the Internet Information Services (IIS) web server on the container:
# escape=` FROM mcr.microsoft.com/windows/servercore:ltsc2019 RUN powershell -Command ` Add-WindowsFeature Web-Server; ` Invoke-WebRequest -UseBasicParsing -Uri “https://dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.10/ServiceMonitor.exe” -OutFile “C:\ServiceMonitor.exe” EXPOSE 80 ENTRYPOINT [“C:\\ServiceMonitor.exe”, “w3svc”]
You can build the image using the following command:
$ docker image build --tag local:dockerfile-iis .
Once built, running docker image ls
should show you the following:
The one immediate thing you will notice...