From 1a8a5d14c1840f658d7d157668c55a3844d4acdd Mon Sep 17 00:00:00 2001 From: Romain Lecat Date: Mon, 16 Feb 2026 11:24:03 +0100 Subject: [PATCH] Fix Dockerfile --- Dockerfile | 55 ++++++++++++++++-------------------------------------- 1 file changed, 16 insertions(+), 39 deletions(-) diff --git a/Dockerfile b/Dockerfile index b9da870..f0d5a15 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,83 +1,60 @@ # syntax=docker/dockerfile:1 -#=========================== -# Stage 1: Build Prowlarr from source -#=========================== +# Build Prowlarr from source with patches applied FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build -# Install build dependencies -RUN apk add --no-cache \ - bash \ - git \ - curl \ - icu-libs \ - nodejs \ - npm \ - yarn +RUN apk add --no-cache bash git curl icu-libs nodejs npm yarn -# Arguments for upstream source ARG PROWLARR_BRANCH="develop" -ARG PROWLARR_REPO="https://github.com/Prowlarr/Prowlarr.git" - WORKDIR /src +RUN git clone --depth 1 --branch "${PROWLARR_BRANCH}" https://github.com/Prowlarr/Prowlarr.git . -# Clone upstream Prowlarr -RUN git clone --depth 1 --branch "${PROWLARR_BRANCH}" "${PROWLARR_REPO}" . - -# Copy and apply patches COPY patches/ /tmp/patches/ RUN git config user.email "build@local" && \ git config user.name "Build" && \ git am /tmp/patches/*.patch -# Install frontend dependencies and build +RUN bash build.sh --backend -r linux-musl-x64 -f net8.0 RUN yarn install --frozen-lockfile --network-timeout 120000 RUN yarn run build --env production - -# Build backend for linux-musl-x64 (Alpine) -RUN bash build.sh --backend -r linux-musl-x64 -f net8.0 - -# Package RUN bash build.sh --packages -r linux-musl-x64 -f net8.0 -#=========================== -# Stage 2: Runtime -#=========================== FROM ghcr.io/linuxserver/baseimage-alpine:3.23 # set version label ARG BUILD_DATE ARG VERSION -ARG PROWLARR_BRANCH="develop" -LABEL build_version="Custom build version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="romain" +ARG PROWLARR_RELEASE +LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" +LABEL maintainer="Roxedus,thespad" # environment settings +ARG PROWLARR_BRANCH="master" ENV XDG_CONFIG_HOME="/config/xdg" \ COMPlus_EnableDiagnostics=0 \ TMPDIR=/run/prowlarr-temp RUN \ - echo "**** install runtime packages ****" && \ + echo "**** install packages ****" && \ apk add -U --upgrade --no-cache \ icu-libs \ sqlite-libs \ - xmlstarlet + xmlstarlet && \ + echo "**** install prowlarr ****" && \ + mkdir -p /app/prowlarr/bin -# Copy compiled Prowlarr from build stage -RUN mkdir -p /app/prowlarr/bin COPY --from=build /src/_artifacts/linux-musl-x64/net8.0/Prowlarr/ /app/prowlarr/bin/ -# Write package info -RUN echo -e "UpdateMethod=docker\nBranch=${PROWLARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=custom-build" > /app/prowlarr/package_info && \ - printf "Custom build version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ +RUN \ + echo -e "UpdateMethod=docker\nBranch=${PROWLARR_BRANCH}\nPackageVersion=${VERSION}\nPackageAuthor=[linuxserver.io](https://www.linuxserver.io/)" > /app/prowlarr/package_info && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ rm -rf \ /app/prowlarr/bin/Prowlarr.Update \ /tmp/* \ /var/tmp/* -# copy local files (s6 services) +# copy local files COPY root/ / # ports and volumes