📄 .containerfile
FROM mcr.microsoft.com/dotnet/sdk:10.0.203 AS build

WORKDIR /app

COPY ./mat-den-dagen.slnx ./global.json ./Directory.Packages.props ./Directory.Build.props ./.gitignore ./.editorconfig ./
COPY ./MatDenDagen/MatDenDagen.csproj ./MatDenDagen/packages.lock.json ./MatDenDagen/

RUN dotnet restore --locked-mode

COPY ./MatDenDagen/ ./MatDenDagen/

RUN dotnet build ./MatDenDagen/MatDenDagen.csproj --no-restore --configuration Release

RUN dotnet publish ./MatDenDagen/MatDenDagen.csproj --no-build --configuration Release --output /out

FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS release

WORKDIR /app

COPY --from=build /out ./

ENTRYPOINT ["dotnet", "./MatDenDagen.dll"]