Dockerfile添加容器运行命令解决Exception has been thrown by the target of an invocation.

This commit is contained in:
YUN-PC5\user 2023-10-27 16:36:48 +08:00
parent a4f03cfbc1
commit b7ebad03d0

View File

@ -1,7 +1,7 @@
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 8888
EXPOSE 443 #EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src WORKDIR /src
@ -27,3 +27,4 @@ FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=publish /app/publish . COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ZR.Admin.WebApi.dll"] ENTRYPOINT ["dotnet", "ZR.Admin.WebApi.dll"]
RUN apt-get update && apt-get install -y libfontconfig1