From 586cede38d277f8ed27289096ebe195f0e41fbf1 Mon Sep 17 00:00:00 2001
From: Gervasio Marchand <github@gervas.io>
Date: Fri, 15 Dec 2023 08:59:00 -0300
Subject: [PATCH] Restore and publish on separate steps (#46)

---
 Dockerfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 4e7cd52..654706c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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"]