Docker Community Forums

Share and learn in the Docker community.

MSdeploy Windows 2019 .NET 4 Build


#1

I am trying to create to build an image using msdeploy. The reason for this is to pull over the Handler Mapping settings, ISAPI Filter settings, IP Address and Domain Restrictions, etc.

I ran msdeploy on a current web application on a Windows 2019 that had all of the desired settings. But when I deploy to a container, it drops all of the settings and the site inherits from the server level.

We created a docker image (applications:ucwebapps-sitebase) from mcr.microsoft.com/windows/servercore/iis which installs windows Features, MSDeploy, Shibboleth, etc.

Dockerfile----------------------------------------------------------------------

Site Dockerfile with MS Deploy

FROM applications:ucwebapps-sitebase

COPY ./uploads/* “C:/temp/uploads/”

WORKDIR c:/temp/uploads
RUN powershell -Command ./sitebuild.ps1

sitebuild.ps1----------------------------------------------------------------------------
$env:path = $env:path + “;C:\Program Files\IIS\Microsoft Web Deploy V3”
msdeploy -verb:sync -source:package=c:\temp\uploads\ucwebapps-dev.zip,userName=WDeployAdmin,encryptPassword=xxxxxxxxx -dest:metakey=lm/w3svc/1 -enablelink:AppPool


How do I get the proper settings to come over? Or do I have to configure each mapping needed?

I have sucessfully added ISAPI Filters and Handler Mappings manually, i just don’t want to have to do that for every one.

New-WebHandler -Name “Shibboleth” -Path “*.sso” -Verb * -Modules IsapiModule -ScriptProcessor “C:\opt\shibboleth-sp\lib64\shibboleth\isapi_shib.dll”

Add-WebConfiguration -Filter /system.webServer/isapiFilters -Value @{
name = “Shibboleth”;
path = “C:\opt\shibboleth-sp\lib64\shibboleth\isapi_shib.dll”
}