def8647de1
Root cause of the production "nothing is interactive" bug. The Dockerfile restored with only the .csproj present (the layer-cache step) and then ran `dotnet publish --no-restore`. That combination silently omits the Blazor framework static assets (wwwroot/_framework/blazor.web.js) from the publish output, so MapStaticAssets 404s the boot script and no interactive circuit starts on any page — buttons, dropdowns (role changes) all dead. Letting publish restore against the full project re-materializes the assets. Reproduced locally and verified the fix. The SDK pin (10.0.203) was a red herring and is left as-is for reproducibility. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35 lines
1.3 KiB
Docker
35 lines
1.3 KiB
Docker
# Base images pinned to exact patch for reproducible builds. Floating `:10.0` tags
|
|
# drift between machines; bump deliberately. (SDK 10.0.203 + runtime 10.0.8.)
|
|
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.203 AS build
|
|
WORKDIR /src
|
|
COPY ["SharepointToolbox.Web.csproj", "."]
|
|
RUN dotnet restore
|
|
COPY . .
|
|
# Do NOT add --no-restore here. The restore above runs with only the .csproj present
|
|
# (no source, no wwwroot); pairing that cached state with `publish --no-restore`
|
|
# silently drops the Blazor framework static assets (wwwroot/_framework/blazor.web.js)
|
|
# from the output → the boot script 404s and no interactive circuit starts on any page.
|
|
# Letting publish restore against the full project re-materializes them. (Reproduced;
|
|
# the early restore above is kept only to cache the NuGet layer.)
|
|
RUN dotnet publish -c Release -o /app/publish
|
|
|
|
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"]
|