Skip to main content

IIS - Default

Dockerfile

FROM mcr.microsoft.com/windows/servercore/iis
RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\*
RUN powershell Remove-WebSite -Name 'Default Web Site'
RUN powershell Import-Module WebAdministration;New-Item –Path IIS:\AppPools\WWWPool;New-Item -Path $env:systemdrive\inetpub\www -Type Directory;New-Item -Path $env:systemdrive\inetpub\XpServerDllFiles -Type Directory;New-WebSite -Name XpNDFAsiaSite -Port 4847 -PhysicalPath "$env:systemdrive\inetpub\www" -ApplicationPool WWWPool -Force;

WORKDIR /inetpub/www
COPY content/ .

EXPOSE 4847

 

Build-Batch

@echo off
docker build -t myiis:v1.0 .