dotnet / core

.NET news, announcements, release notes, and more!
https://dot.net
MIT License
21.04k stars 4.9k forks source link

docker build failure: hcsshim::PrepareLayer - failed failed in Win32: Incorrect function. (0x1) #6949

Open TseWhat opened 3 years ago

TseWhat commented 3 years ago

Problem encountered on https://dotnet.microsoft.com/learn/aspnet/microservice-tutorial/docker-image Operating System: windows

Dockerfile contents as per the tutorial:

FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
WORKDIR /src
COPY MyMicroservice.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c release -o app

FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "MyMicroservice.dll"]

Attempting to follow the tutorial running the command:

docker build -t mymicroservice .

Results in the error message:

hcsshim::PrepareLayer - failed failed in Win32: Incorrect function. (0x1)

eiriktsarpalis commented 3 years ago

cc @shirhatti @nishanil