ARG source FROM mcr.microsoft.com/windows/servercore:10.0.17134.1305 COPY ${source:-obj/Docker/publish/CPLUS_INSTALLS} "c:\CPLUS_INSTALLS" COPY ${source:-obj/Docker/publish/CPLUS_INSTALLS/2005/vcredist_x86.EXE} "c:\vcredist_x86.EXE" #COPY ${source:-obj/Docker/publish/VC_redist.arm64.exe} "c:\VC_redist.arm64.exe" USER ContainerAdministrator #x86 Install #SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; $verbosePreference='Continue';"] #RUN c:\vcredist_x86.EXE /install /passive /norestart /log a.txt #RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2005\vcredist_x86.exe -ArgumentList '/quiet' -Wait; RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2008\vcredist_x86.exe -ArgumentList '/quiet' -Wait; RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2010\vcredist_x86.exe -ArgumentList '/quiet' -Wait; RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2013\vcredist_x86.exe -ArgumentList '/quiet' -Wait; RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2015\vc_redist.x86.exe -ArgumentList '/quiet' -Wait; #x64 Install #RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2005\vcredist_x64.exe -ArgumentList '/quiet' -Wait; RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2008\vcredist_x64.exe -ArgumentList '/quiet' -Wait; RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2010\vcredist_x64.exe -ArgumentList '/quiet' -Wait; RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2013\vcredist_x64.exe -ArgumentList '/quiet' -Wait; RUN powershell -Command Start-Process c:\CPLUS_INSTALLS\2015\vc_redist.x64.exe -ArgumentList '/quiet' -Wait; RUN dism.exe /online /enable-feature /all /featurename:iis-webserver /NoRestart RUN dism /online /enable-feature /featurename:ServerCore-WOW64 RUN dism /online /enable-feature /featurename:IIS-WebSockets RUN dism /online /enable-feature /featurename:IIS-RequestMonitor RUN dism /online /enable-feature /featurename:IIS-CertProvider RUN dism /online /enable-feature /featurename:IIS-Performance #RUN dism /online /enable-feature /featurename:IIS-ManagementConsole RUN dism /online /enable-feature /featurename:WAS-WindowsActivationService RUN dism /online /enable-feature /all /featurename:WCF-HTTP-Activation45 RUN dism /online /enable-feature /all /featurename:WCF-Pipe-Activation45 RUN dism /online /enable-feature /all /featurename:WCF-MSMQ-Activation45 RUN dism /online /enable-feature /all /featurename:WCF-TCP-PortSharing45 #RUN dism /online /enable-feature /all /featurename:Internet-Explorer-Optional-amd64 #RUN dism /online /enable-feature /featurename:Microsoft-Hyper-V-Common-Drivers-Package #RUN dism /online /enable-feature /featurename:Microsoft-Hyper-V-Guest-Integration-Drivers-Package #RUN dism /online /enable-feature /featurename:Microsoft-Windows-NetFx-VCRedist-Package #RUN dism /online /enable-feature /featurename:Microsoft-Windows-Printing-PrintToPDFServices-Package #RUN dism /online /enable-feature /featurename:Microsoft-Windows-Printing-XPSServices-Package #RUN dism /online /enable-feature /featurename:Microsoft-Windows-Client-EmbeddedExp-Package #RUN dism /online /enable-feature /featurename:NetFx2/Enable-Feature-ServerCore COPY ${source:-obj/Docker/publish/cplusMissingdll/mfc140d.dll} "c:\windows\system32\mfc140d.dll" COPY ${source:-obj/Docker/publish/cplusMissingdll/ucrtbased.dll} "c:\windows\system32\ucrtbased.dll" COPY ${source:-obj/Docker/publish/cplusMissingdll/ucrtbased.dll} "c:\windows\SysWOW64\ucrtbased.dll" COPY ${source:-obj/Docker/publish/cplusMissingdll/vcruntime140d.dll} "c:\windows\system32\vcruntime140d.dll" COPY ${source:-obj/Docker/publish/cplusMissingdll/vcruntime140d.dll} "c:\windows\SysWOW64\vcruntime140d.dll" #Copy Begin Perl to Image COPY ${source:-obj/Docker/publish/strawberry-perl-5.26.1.1-64bit-portable.zip} ./perl/perl.zip RUN powershell -Command Expand-Archive -Path ./perl/perl.zip -DestinationPath C:\strawberry\ -Force #END SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] RUN Add-WindowsFeature Web-Server; \ Add-WindowsFeature NET-Framework-45-ASPNET; \ Add-WindowsFeature Web-Asp-Net45; \ Remove-Item -Recurse C:\inetpub\wwwroot\*; RUN md c:\temp\datacenterwcfws\; \ md c:\temp\DCProcessing\; \ new-item c:\temp\DCProcessing\DCProcessingLog.txt; ## Enable net.tcp protocol for default web site on IIS #RUN windows\system32\inetsrv\appcmd.exe set app 'Default Web Site/' /enabledProtocols:"http,net.tcp" #EXPOSE 80 ###---------------------------------------IIS Enable 32 bit ----------------------------------------------- RUN c:\windows\system32\inetsrv\appcmd set apppool /apppool.name:DefaultAppPool /enable32BitAppOnWin64:true RUN c:\windows\system32\inetsrv\appcmd recycle apppool /apppool.name:DefaultAppPool RUN c:\windows\system32\inetsrv\appcmd set apppool /apppool.name:'.NET v4.5 Classic' /enable32BitAppOnWin64:true # RUN c:\windows\system32\inetsrv\appcmd recycle apppool /apppool.name:'.NET v4.5 Classic' RUN c:\windows\system32\inetsrv\appcmd set apppool /apppool.name:'.NET v4.5' /enable32BitAppOnWin64:true RUN c:\windows\system32\inetsrv\appcmd recycle apppool /apppool.name:'.NET v4.5' ###END-----------------------------------IIS Enable 32 bit ------------------------------------------------- RUN c:\windows\SysWOW64\inetsrv\appcmd set apppool /apppool.name:DefaultAppPool /enable32BitAppOnWin64:true RUN c:\windows\SysWOW64\inetsrv\appcmd recycle apppool /apppool.name:DefaultAppPool RUN c:\windows\SysWOW64\inetsrv\appcmd set apppool /apppool.name:'.NET v4.5 Classic' /enable32BitAppOnWin64:true # RUN c:\windows\SysWOW64\inetsrv\appcmd recycle apppool /apppool.name:'.NET v4.5 Classic' RUN c:\windows\SysWOW64\inetsrv\appcmd set apppool /apppool.name:'.NET v4.5' /enable32BitAppOnWin64:true RUN c:\windows\SysWOW64\inetsrv\appcmd recycle apppool /apppool.name:'.NET v4.5' WORKDIR /inetpub/wwwroot EXPOSE 83 COPY ${source:-obj/Docker/publish/ServiceMonitor.exe} "C:\ServiceMonitor.exe" CMD start /w .\ServiceMonitor.exe /q COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["C:\\ServiceMonitor.exe", "w3svc"]