Files
jellyfin-ha/Dockerfile.runtime
T
unkin-agent c7409d0812
ci/woodpecker/pr/build Pipeline was successful
fix: align runtime image .NET to the app (9.0)
The runtime image based on aspnet:10.0 provides only .NET 10.x, but the
publish step builds framework-dependent against SDK 9.0, so the app requires
Microsoft.NETCore.App 9.0.0 and crashes on start under 10.x.

Pin the runtime base to aspnet:9.0 to match the SDK 9.0 publish.
2026-08-15 18:40:05 +10:00

61 lines
2.6 KiB
Docker

# syntax=docker/dockerfile:1
# Runtime-only image for the jellyfin-ha fork.
#
# The .NET publish step runs on the CI host (see .woodpecker/*.yaml) and drops
# its output into ./publish-output, which is COPYed in below. This file is a
# vendored copy of upstream's Dockerfile.runtime so we control the pinned
# jellyfin-web version and base image; bump alongside UPSTREAM_REF.
# ── Web client stage ──────────────────────────────────────────────────────────
# Install jellyfin-web via the official Jellyfin apt repo (prebuilt, no npm).
# Web assets land at /usr/share/jellyfin/web/.
FROM --platform=linux/amd64 debian:bookworm-slim AS webclient
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl gnupg ca-certificates \
&& curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key \
| gpg --dearmor -o /usr/share/keyrings/jellyfin.gpg \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/jellyfin.gpg] https://repo.jellyfin.org/debian bookworm main" \
> /etc/apt/sources.list.d/jellyfin.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends "jellyfin-web=10.11.6+deb12" \
&& rm -rf /var/lib/apt/lists/*
# ── Runtime stage ─────────────────────────────────────────────────────────────
# .NET 9 runtime: matches the SDK 9.0 publish step (framework-dependent), so the
# app's required Microsoft.NETCore.App 9.0 is present. Keep in lockstep with the
# `mcr.microsoft.com/dotnet/sdk` major in .woodpecker/*.yaml and the Makefile.
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:9.0
# FFmpeg and the native deps required by SkiaSharp and fontconfig.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ffmpeg \
fontconfig \
libfontconfig1 \
libfreetype6 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /jellyfin
# Pre-built publish output produced by `dotnet publish` on the CI host.
COPY publish-output/ .
# jellyfin-web client assets from the webclient stage.
COPY --from=webclient /usr/share/jellyfin/web ./jellyfin-web/
# Jellyfin default ports
EXPOSE 8096
EXPOSE 8920
# Data / config volumes
VOLUME ["/config", "/cache", "/media"]
ENV JELLYFIN_DATA_DIR=/config \
JELLYFIN_CACHE_DIR=/cache \
JELLYFIN_LOG_DIR=/config/log
ENTRYPOINT ["./jellyfin", \
"--datadir", "/config", \
"--cachedir", "/cache", \
"--webdir", "/jellyfin/jellyfin-web"]