fix(dockerfile): disable TreatWarningsAsErrors for Docker publish step

StyleCop analyzer violations in upstream src/Jellyfin.Extensions/ block
the Docker build when TreatWarningsAsErrors=true (from Directory.Build.props).
Disable for container image builds — StyleCop enforcement is the CI pipeline's
responsibility, not the Dockerfile's.
This commit is contained in:
mat
2026-03-04 22:00:15 -05:00
parent 2e5fb57052
commit 849f0a06c8
+4
View File
@@ -31,11 +31,15 @@ RUN dotnet restore Jellyfin.Server/Jellyfin.Server.csproj \
# Publish the server (and all transitive dependencies, including the
# PostgreSQL provider assembly added by this fork).
# Note: TreatWarningsAsErrors is disabled for the Docker build — StyleCop
# analyzer violations in upstream src/ projects would otherwise block the
# image build. StyleCop is enforced in the CI pipeline, not the Dockerfile.
RUN dotnet publish Jellyfin.Server/Jellyfin.Server.csproj \
--configuration Release \
--runtime linux-x64 \
--self-contained false \
--no-restore \
-p:TreatWarningsAsErrors=false \
--output /app
# ── Runtime stage ─────────────────────────────────────────────────────────────