We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49f4542 commit 1cf4402Copy full SHA for 1cf4402
src/Dockerfile
@@ -4,11 +4,15 @@
4
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
5
WORKDIR /src
6
7
-# Copy everything
+# Copy csproj files and restore dependencies
8
+COPY *.csproj ./
9
+RUN dotnet restore
10
+
11
+# Copy the remaining source code
12
COPY . .
13
14
# Publish in Release mode to a clean output folder
-RUN dotnet publish -c Release -o /app/publish --no-restore
15
+RUN dotnet publish -c Release -o /app/publish
16
17
# ==============================
18
# Runtime stage
0 commit comments