dotnet / dotnet/core

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

Open
#6,949 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
22k
Forks
4.9k
Avg merge
5d 5h
Merged PRs (30d)
29

Description

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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.