From 7a27a696dad3aeb83f0b35f2a561eb42193f3804 Mon Sep 17 00:00:00 2001 From: tiananlin Date: Mon, 25 Aug 2025 14:12:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Learn.Archives.API/Dockerf?= =?UTF-8?q?iles/Dockerfile-staging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Learn.Archives.API/Dockerfiles/Dockerfile-staging | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Learn.Archives.API/Dockerfiles/Dockerfile-staging diff --git a/Learn.Archives.API/Dockerfiles/Dockerfile-staging b/Learn.Archives.API/Dockerfiles/Dockerfile-staging new file mode 100644 index 0000000..d5160ee --- /dev/null +++ b/Learn.Archives.API/Dockerfiles/Dockerfile-staging @@ -0,0 +1,15 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS publish +WORKDIR /src +COPY . . +WORKDIR "/src/Learn.Archives.API" +ENV NUGET_XMLDOC_MODE none +RUN dotnet nuget add source --name marking https://gitea.23544.com/api/packages/marking/nuget/index.json +RUN dotnet publish "Learn.Archives.API.csproj" -c Release -o /app + +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final +WORKDIR /app +COPY --from=publish /app . +ENV ASPNETCORE_ENVIRONMENT=Staging +ENV TZ=Asia/Shanghai +EXPOSE 8080 +ENTRYPOINT ["dotnet", "Learn.Archives.API.dll"] \ No newline at end of file