# Stage 1: Build the applicationFROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS publishWORKDIR /srcCOPY *.csproj .RUN dotnet restoreCOPY . .RUN dotnet publish -c Release -o /app --no-restore# Stage 2: Build the runtime imageFROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine# Install required librariesRUN apk add --no-cache icu-libsRUN apk add --no-cache krb5-libs krb5RUN apk add --no-cache tzdata# Configure environment variablesENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=falseENV TZ=Europe/OsloWORKDIR /appCOPY --from=publish /app .USER appEXPOSE 8080ENTRYPOINT ["dotnet", "SetupPortalAPI.dll"]