17 lines
595 B
Docker
17 lines
595 B
Docker
# Stage 1: Build
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
WORKDIR /app
|
|
|
|
COPY ["nuget.config", "./"]
|
|
COPY ["LiteCharmsScheduler/LiteCharmsScheduler.csproj", "LiteCharmsScheduler/"]
|
|
RUN dotnet restore "LiteCharmsScheduler/LiteCharmsScheduler.csproj" --configfile nuget.config
|
|
COPY . .
|
|
RUN dotnet publish "LiteCharmsScheduler/LiteCharmsScheduler.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
|
|
|
# Stage 2: Final Image (Headless Runtime)
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
|
WORKDIR /app
|
|
|
|
COPY --from=build /app/publish .
|
|
|
|
ENTRYPOINT ["dotnet", "LiteCharmsScheduler.dll"] |