fyf 2 年之前
父節點
當前提交
72eb946a5b
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. +5
    -5
      Dockerfile

+ 5
- 5
Dockerfile 查看文件

@@ -7,16 +7,16 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["NuGet.config", "."]
COPY ["DataV/DataV.csproj", "DataV/"]
RUN dotnet restore "DataV/DataV.csproj" --configfile "NuGet.config"
COPY ["服务API/服务API.csproj", "服务API/"]
RUN dotnet restore "服务API/服务API.csproj" --configfile "NuGet.config"
COPY . .
WORKDIR "/src/DataV"
RUN dotnet build "DataV.csproj" -c Release -o /app/build
RUN dotnet build "服务API.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "DataV.csproj" -c Release -o /app/publish
RUN dotnet publish "服务API.csproj" -c Release -o /app/publish

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

Loading…
取消
儲存