# Base images pinned to exact patch for reproducible builds. Floating `:10.0` tags # drift; a stale/pre-GA SDK base silently drops the Blazor framework static assets # (blazor.web.js) from the publish manifest → 404 in production. Bump deliberately. FROM mcr.microsoft.com/dotnet/aspnet:10.0.8 AS base WORKDIR /app EXPOSE 8080 # curl for the compose healthcheck (aspnet image ships no wget/curl). RUN apt-get update \ && apt-get install -y --no-install-recommends curl \ && rm -rf /var/lib/apt/lists/* FROM mcr.microsoft.com/dotnet/sdk:10.0.300 AS build WORKDIR /src COPY ["SharepointToolbox.Web.csproj", "."] RUN dotnet restore COPY . . RUN dotnet publish -c Release -o /app/publish --no-restore FROM base AS final WORKDIR /app COPY --from=build /app/publish . # Volume for persistent data (profiles, settings, templates, logs, exports) VOLUME ["/data"] ENV ASPNETCORE_URLS=http://+:8080 ENV DataFolder=/data ENTRYPOINT ["dotnet", "SharepointToolbox.Web.dll"]