Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 35 additions & 12 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
FROM node:22.19.0-bookworm@sha256:6fe286835c595e53cdafc4889e9eff903dd3008a3050c1675809148d8e0df805 AS base
ARG DEBIAN_RELEASE=trixie

FROM node:22.19.0-${DEBIAN_RELEASE}-slim@sha256:d02467efc049791a7586a20e36d9219d184ab89e45b19c57e88cff322678c233 AS base
ARG DEBIAN_RELEASE
ENV DEBIAN_RELEASE=${DEBIAN_RELEASE}

WORKDIR /usr/src/app

ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \

Check warning on line 9 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (prod) / build (linux/amd64, ubuntu-latest)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 9 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (prod) / build (linux/amd64, ubuntu-latest)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_RUN_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 9 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (prod) / build (linux/arm64, ubuntu-24.04-arm)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 9 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (prod) / build (linux/arm64, ubuntu-24.04-arm)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_RUN_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 9 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (dev) / build (linux/arm64, ubuntu-24.04-arm)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_RUN_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 9 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (dev) / build (linux/arm64, ubuntu-24.04-arm)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 9 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (dev) / build (linux/amd64, ubuntu-latest)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_RUN_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 9 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (dev) / build (linux/amd64, ubuntu-latest)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
LD_RUN_PATH=/usr/local/lib:$LD_RUN_PATH

COPY configure-apt.sh ./

# when trixie is released, move libio-compress-brotli-perl from testing to stable
# Install ca-certificates first, then setup PostgreSQL repository
RUN ./configure-apt.sh && \
apt-get update && \
apt-get install --no-install-recommends -yqq ca-certificates && \
mkdir -p /usr/share/postgresql-common/pgdg

ADD --chmod=644 https://www.postgresql.org/media/keys/ACCC4CF8.asc /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc

RUN echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${DEBIAN_RELEASE}-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
apt-get update && \
apt-get install --no-install-recommends -yqq \
git \
autoconf \
automake \
libtool \
libltdl-dev \
build-essential \
cmake \
jq \
Expand All @@ -21,7 +36,7 @@
libexpat1-dev \
libglib2.0-dev \
libgsf-1-dev \
libmimalloc2.0 \
libmimalloc3 \
# libjpeg62-turbo-dev is just for building libvips; the final image uses jpegli (/usr/local/lib/libjpeg.so.62) built alongside libjxl
libjpeg62-turbo-dev \
liblcms2-2 \
Expand All @@ -31,6 +46,7 @@
ninja-build \
pkg-config \
wget \
unzip \
zlib1g \
cpanminus \
postgresql-client-14 \
Expand All @@ -42,22 +58,23 @@
ocl-icd-libopencl1 \
libopenmpt0 \
libbluray2 \
libvpx7 \
libvpx9 \
libzvbi0 \
libmp3lame0 \
libopus0 \
libtheora0 \
libvorbis0a \
libvorbisenc2 \
libx264-164 && \
apt-get install -t testing --no-install-recommends -yqq \
libx264-164 \
libdav1d-dev \
libhwy-dev \
libwebp-dev \
libio-compress-brotli-perl \
libaom-dev

FROM base AS ffmpeg
ARG DEBIAN_RELEASE
ENV DEBIAN_RELEASE=${DEBIAN_RELEASE}

COPY packages/ffmpeg.json packages/ffmpeg.sh ./
RUN ./ffmpeg.sh
Expand Down Expand Up @@ -136,7 +153,9 @@
'{sources: $sources[0], packages: $packages[0]}' \
> /build/build-lock.json

FROM node:22.19.0-bookworm-slim@sha256:0ae9e80c8c7e7a8fea5bc8e8762e4fd09a7a68c251abf8cf44ea0863efda2bc5 AS prod
FROM node:22.19.0-${DEBIAN_RELEASE}-slim@sha256:d02467efc049791a7586a20e36d9219d184ab89e45b19c57e88cff322678c233 AS prod
ARG DEBIAN_RELEASE
ENV DEBIAN_RELEASE=${DEBIAN_RELEASE}

WORKDIR /build

Expand All @@ -145,6 +164,11 @@
RUN apt-get update && \
apt-get install curl ca-certificates --no-install-recommends -yqq && \
./configure-apt.sh && \
mkdir -p /usr/share/postgresql-common/pgdg

ADD --chmod=644 https://www.postgresql.org/media/keys/ACCC4CF8.asc /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc

RUN echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${DEBIAN_RELEASE}-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
apt-get update && \
apt-get install --no-install-recommends -yqq \
jq \
Expand All @@ -158,7 +182,7 @@
liblcms2-2 \
liblqr-1-0 \
libltdl7 \
libmimalloc2.0 \
libmimalloc3 \
libopenexr-3-1-30 \
libopenjp2-7 \
librsvg2-2 \
Expand All @@ -173,22 +197,21 @@
postgresql-client-14 \
postgresql-client-15 \
postgresql-client-16 \
postgresql-client-17 && \
./ffmpeg.sh && \
apt-get install -t testing --no-install-recommends -yqq \
postgresql-client-17 \
libio-compress-brotli-perl \
libwebp7 \
libwebpdemux2 \
libwebpmux3 \
libhwy1t64 \
libaom3 && \
./ffmpeg.sh && \
if [ $(arch) = "x86_64" ]; then \
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-core_1.0.17193.4_amd64.deb && \
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17193.4/intel-igc-opencl_1.0.17193.4_amd64.deb && \
wget https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/intel-opencl-icd_24.26.30049.6_amd64.deb && \
wget https://github.com/intel/compute-runtime/releases/download/24.26.30049.6/libigdgmm12_22.3.20_amd64.deb && \
dpkg -i *.deb && \
apt-get install -t testing --no-install-recommends -yqq intel-media-va-driver-non-free; \
apt-get install --no-install-recommends -yqq intel-media-va-driver-non-free; \
fi && \
apt-get remove -yqq jq wget ca-certificates && \
apt-get autoremove -yqq && \
Expand All @@ -207,6 +230,6 @@

WORKDIR /usr/src/app

ENV LD_LIBRARY_PATH=/usr/lib/jellyfin-ffmpeg/lib:/usr/lib/wsl/lib:$LD_LIBRARY_PATH

Check warning on line 233 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (prod) / build (linux/amd64, ubuntu-latest)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 233 in server/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push (prod) / build (linux/arm64, ubuntu-24.04-arm)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

RUN ldconfig /usr/local/lib
35 changes: 18 additions & 17 deletions server/configure-apt.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#!/usr/bin/env bash

export DEBIAN_RELEASE=${DEBIAN_RELEASE:=trixie}
set -e

sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources
sed -i -e's/ bookworm-updates/ bookworm-updates testing sid/g' /etc/apt/sources.list.d/debian.sources

# default priority is 500, so we set unstable to 450 to prefer stable packages
cat > /etc/apt/preferences.d/preferences << EOL
Package: *
Pin: release a=unstable
Pin-Priority: 450

Package: *
Pin: release a=testing
Pin-Priority: 450
EOL

# Setup postgresql repository
install -d /usr/share/postgresql-common/pgdg
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list
# Note: the following lines are commented out because mixing trixie with unstable/testing causes package
# resolution conflicts due to the time64 migration. Trixie rebuilt all packages with a 64 bit time_t, but
# they left the 32 bit time version in place. The 64 bit time version has t64 sufix in the package name.
# More info: https://lwn.net/Articles/938149/ https://wiki.debian.org/ReleaseGoals/64bit-time
#
# sed -i -e"s/ ${DEBIAN_RELEASE}-updates/ ${DEBIAN_RELEASE}-updates testing sid/g" /etc/apt/sources.list.d/debian.sources
#
# # default priority is 500, so we set unstable to 450 to prefer stable packages
# cat > /etc/apt/preferences.d/preferences << EOL
# Package: *
# Pin: release a=unstable
# Pin-Priority: 450
#
# Package: *
# Pin: release a=testing
# Pin-Priority: 450
# EOL
4 changes: 2 additions & 2 deletions server/packages/ffmpeg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ffmpeg",
"version": "7.1.1-6",
"sha256": {
"amd64": "bad8fbbb06ba168c75e2d4c8771eb4b1123588c0b7cbded7efcd2d38983df49b",
"arm64": "a80d874420576cf28590e2fc9e598b6f3e4d1b02139b2575a555daeeaf7374fb"
"amd64": "88b7885cbcc3a5fb3eb75b6a05b3196a1b8f6fe7607618f82d7e24e9e4804f22",
"arm64": "4ca4928da516b4b1266d7d10e1d76ff2cb596090412d8a2fdfa7a84f92263755"
}
}
9 changes: 5 additions & 4 deletions server/packages/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
set -e

export TARGETARCH=${TARGETARCH:=$(dpkg --print-architecture)}
export DEBIAN_RELEASE=${DEBIAN_RELEASE:=trixie}
: "${FFMPEG_VERSION:=$(jq -cr '.version' ffmpeg.json)}"
: "${FFMPEG_SHA256:=$(jq -cr '.sha256[$ENV.TARGETARCH]' ffmpeg.json)}"
echo "$FFMPEG_SHA256 jellyfin-ffmpeg7_${FFMPEG_VERSION}-bookworm_${TARGETARCH}.deb" > ffmpeg.sha256
echo "$FFMPEG_SHA256 jellyfin-ffmpeg7_${FFMPEG_VERSION}-${DEBIAN_RELEASE}_${TARGETARCH}.deb" > ffmpeg.sha256

wget -nv https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v"${FFMPEG_VERSION}"/jellyfin-ffmpeg7_"${FFMPEG_VERSION}"-bookworm_"${TARGETARCH}".deb
wget -nv "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v${FFMPEG_VERSION}/jellyfin-ffmpeg7_${FFMPEG_VERSION}-${DEBIAN_RELEASE}_${TARGETARCH}.deb"
sha256sum -c ffmpeg.sha256
apt-get -yqq -f install ./jellyfin-ffmpeg7_"${FFMPEG_VERSION}"-bookworm_"${TARGETARCH}".deb
rm jellyfin-ffmpeg7_"${FFMPEG_VERSION}"-bookworm_"${TARGETARCH}".deb
apt-get -yqq -f install "./jellyfin-ffmpeg7_${FFMPEG_VERSION}-${DEBIAN_RELEASE}_${TARGETARCH}.deb"
rm "jellyfin-ffmpeg7_${FFMPEG_VERSION}-${DEBIAN_RELEASE}_${TARGETARCH}.deb"
rm ffmpeg.sha256
ldconfig /usr/lib/jellyfin-ffmpeg/lib

Expand Down
2 changes: 1 addition & 1 deletion server/sources/imagemagick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ git clone https://github.com/ImageMagick/ImageMagick.git
cd ImageMagick
git reset --hard "$IMAGEMAGICK_REVISION"

./configure --with-modules
./configure --with-modules CPPFLAGS="-DMAGICK_LIBRAW_VERSION_TAIL=202502"
echo "Building ImageMagick using $(nproc) threads"
make -j"$(nproc)"
make install
Expand Down
Loading