Skip to content
This repository was archived by the owner on Mar 11, 2020. It is now read-only.
This repository was archived by the owner on Mar 11, 2020. It is now read-only.

The container operating system does not match the host operating system. #81

Open
@sanchetanparmar

Description

@sanchetanparmar

After installation, running following commands

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions