无法注册层:处理tar文件时出错(退出状态1):link /Files/Program Files/common files/Microsoft Shared/Ink/en-US/micaut.dll.mui /Files/Program Files(x86)/common files/Microsoft Shared/ink/en-US/micaut.dll.mui:没有这样的文件或目录
**Docker文件:**FROMmcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019AS base WORKDIR /app EXPOSE 8080
从mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019AS build WORKDIR /src COPY *.csproj .
RUN dotnet restore“xyz.csproj”COPY . . WORKDIR“/src/.”RUN dotnet build“xyz.csproj”-c Release -o /app/build
FROM build AS publish RUN dotnet publish“xyz.csproj”-c Release -o /app/publish
FROM base AS final WORKDIR /app COPY --from=publish /app/publish。
ENTRYPOINT [“dotnet”,“xyz.dll”]
1条答案
按热度按时间guicsvcw1#
请检查此答案:https://stackoverflow.com/a/66083090
您的Docker主机可能配置为在VM中运行Linux容器。要运行Windows容器,您需要在Docker菜单中“切换到Windows容器”。