【问题标题】:Building ASP.NET Core API Docker Image failed in windows在 Windows 中构建 ASP.NET Core API Docker 映像失败
【发布时间】:2019-02-20 04:24:10
【问题描述】:

我是 Docker 世界的新手。我创建了一个简单的 ASP.NET Core API。我尝试构建 Docker 映像,但我不会构建。

这是我的 docker 文件。

FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM microsoft/dotnet:2.2-sdk-nanoserver-1803 AS build
WORKDIR /src
COPY ["FirstDemo/FirstDemo.csproj", "FirstDemo/"]
RUN dotnet restore "FirstDemo/FirstDemo.csproj"
COPY . .
WORKDIR "/src/FirstDemo"
RUN dotnet build "FirstDemo.csproj" -c Release -o /app

FROM build AS publish
RUN dotnet publish "FirstDemo.csproj" -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "FirstDemo.dll"]

这是我的错误

Step 1/17 : FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803 AS base
2.2-aspnetcore-runtime-nanoserver-1803: Pulling from microsoft/dotnet
e46172273a4e: Pull complete
68aae72b77f3: Pull complete
02db7ef764ae: Pull complete
b85c87d0746a: Pull complete
8ded5310ea16: Pull complete
50f3c06b2324: Pull complete
57b0e03264f9: Pull complete
Digest: sha256:7b0c816859dca7eeab5ae92fea96090fb37fc966622649db0567f0c752552d4a
Status: Downloaded newer image for microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803
 ---> 422d1790b708
Step 2/17 : WORKDIR /app
 ---> Running in 8ae8be6cb8c0
**re-exec error: exit status 1: output: time="2019-02-19T23:15:48-05:00" level=error msg="hcsshim::ImportLayer failed in Win32: The system cannot find the path specified. (0x3) path=\\\\?\\C:\\ProgramData\\Docker\\windowsfilter\\*****  folder=C:\\ProgramData\\Docker\\tmp\\hcs815654479"
hcsshim::ImportLayer failed in Win32: The system cannot find the path specified. (0x3) path=\\?\C:\ProgramData\Docker\windowsfilter\****** folder=C:\ProgramData\Docker\tmp\hcs815654479**

我也找到了这个question,但它对我没有帮助。请给我建议。

【问题讨论】:

    标签: asp.net docker asp.net-core dockerfile


    【解决方案1】:

    对于那些可能有同样问题的人。

    问题在于我们的安全应用程序(CHECKPOINT- ENDPOINT Security)

    它阻止了 Docker 对文件系统的访问。现在,我们将其删除,然后一切顺利。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-10-25
      • 2019-12-02
      • 2022-08-18
      • 1970-01-01
      • 1970-01-01
      • 2018-06-02
      • 2019-12-13
      相关资源
      最近更新 更多