Skip to content

Commit 1cf4402

Browse files
committed
Fixed Dockerfile
1 parent 49f4542 commit 1cf4402

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
55
WORKDIR /src
66

7-
# Copy everything
7+
# Copy csproj files and restore dependencies
8+
COPY *.csproj ./
9+
RUN dotnet restore
10+
11+
# Copy the remaining source code
812
COPY . .
913

1014
# Publish in Release mode to a clean output folder
11-
RUN dotnet publish -c Release -o /app/publish --no-restore
15+
RUN dotnet publish -c Release -o /app/publish
1216

1317
# ==============================
1418
# Runtime stage

0 commit comments

Comments
 (0)