ConvertTo-Dockerfile -Local -OutputPath c:\docker_repo\iis -Artifact IIS -Verbose
will generate Dockerfile
OS - Windows-2016DC
Enabled - Install-WindowsFeature -Name Hyper-V
# escape=`
FROM microsoft/aspnet:3.5-windowsservercore-10.0.14393.1715
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Remove-Website 'Default Web Site';
# Set up website: test
RUN New-Item -Path 'C:\inetpub\Publish\Publish\' -Type Directory -Force;
RUN New-Website -Name 'test' -PhysicalPath 'C:\inetpub\Publish\Publish\' -Port 80 -ApplicationPool '.NET v2.0' -Force;
EXPOSE 80
COPY ["Publish", "/inetpub/Publish/Publish/"]
RUN $path='C:\inetpub\Publish\Publish\'; `
$acl = Get-Acl $path; `
$newOwner = [System.Security.Principal.NTAccount]('BUILTIN\IIS_IUSRS'); `
$acl.SetOwner($newOwner); `
dir -r $path | Set-Acl -aclobject $acl
but when i run docker build -t -t mywebsite . getting below errors
hcsshim::CreateComputeSystem 15f2c7d3 : The container operating system does not match the host operating system.
if i changed - FROM mcr.microsoft.com/dotnet/framework/aspnet:3.5
image build successful but when access container -
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
After installation, running following commands
ConvertTo-Dockerfile -Local -OutputPath c:\docker_repo\iis -Artifact IIS -Verbose
will generate DockerfileOS - Windows-2016DC Enabled - Install-WindowsFeature -Name Hyper-V
but when i run
docker build -t -t mywebsite .
getting below errorshcsshim::CreateComputeSystem 15f2c7d3 : The container operating system does not match the host operating system.
if i changed - FROM mcr.microsoft.com/dotnet/framework/aspnet:3.5
image build successful but when access container - 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.