Files
CronApp/Dockerfile
2025-08-10 09:55:21 +02:00

20 lines
464 B
Docker

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 . .
# 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", "Scheduler.dll"]