Restore and publish on separate steps (#46)

This commit is contained in:
Gervasio Marchand 2023-12-15 08:59:00 -03:00 committed by GitHub
parent 5919c3bc6f
commit 586cede38d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,8 @@ ARG ARCH=
FROM mcr.microsoft.com/dotnet/sdk:8.0.100-1-alpine3.18-${ARCH} AS builder
WORKDIR /src
COPY src /src/
RUN dotnet publish -c Release /src/GetMoarFediverse.csproj -o /app
RUN dotnet restore /src/GetMoarFediverse.csproj --disable-parallel
RUN dotnet publish -c Release /src/GetMoarFediverse.csproj -o /app --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-alpine3.18-${ARCH}
VOLUME ["/data"]