From 733db92970a017a637a3481e711c0f069bf5ae9e Mon Sep 17 00:00:00 2001 From: Johnny Reijnst Date: Sun, 10 Aug 2025 09:55:21 +0200 Subject: [PATCH] . --- Dockerfile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d44a074..0a8bd65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,19 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src + +# Copy solution + project files first (for restore) +COPY CronApp.sln ./ +COPY Scheduler/Scheduler.csproj Scheduler/ + +RUN dotnet restore CronApp.sln + +# Copy rest of the source COPY . . -RUN dotnet publish -c Release -o /app + +# Publish from the project folder +RUN dotnet publish Scheduler/Scheduler.csproj -c Release -o /app FROM mcr.microsoft.com/dotnet/runtime:8.0 WORKDIR /app COPY --from=build /app . -ENTRYPOINT ["dotnet", "CronApp.dll"] +ENTRYPOINT ["dotnet", "Scheduler.dll"]