Fix Docker build: publish Console project instead of Windows GUI

NzbDrone/Prowlarr.csproj is the Windows GUI entry point (WinForms,
net8.0-windows). NzbDrone.Console/Prowlarr.Console.csproj is the
headless Linux entry point (net8.0) which outputs as 'Prowlarr'.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
nitrobass24 2026-04-06 21:50:16 -05:00
parent 94d619229b
commit 762fe61df3

View file

@ -27,19 +27,17 @@ COPY src/Prowlarr.Http/Prowlarr.Http.csproj src/Prowlarr.Http/
COPY src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj src/ServiceHelpers/ServiceInstall/
COPY src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj src/ServiceHelpers/ServiceUninstall/
RUN dotnet restore src/NzbDrone/Prowlarr.csproj -r "$(cat /tmp/rid)" -p:SelfContained=true -p:EnableWindowsTargeting=true
RUN dotnet restore src/NzbDrone.Console/Prowlarr.Console.csproj -r "$(cat /tmp/rid)" -p:SelfContained=true
# Copy remaining source and build
COPY src/ src/
COPY LICENSE LICENSE
RUN dotnet publish src/NzbDrone/Prowlarr.csproj \
RUN dotnet publish src/NzbDrone.Console/Prowlarr.Console.csproj \
-c Release \
-f net8.0 \
-r "$(cat /tmp/rid)" \
--self-contained \
--no-restore \
-p:EnableWindowsTargeting=true \
-o /build/bin && \
rm -rf /build/bin/Prowlarr.Update /build/bin/Prowlarr.Windows.* \
/build/bin/ServiceInstall.* /build/bin/ServiceUninstall.*