/
Dockerfile
75 lines (61 loc) · 2.66 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM node:14.18.0-buster@sha256:aa911a910849f375a642ed43e97dd1a6f132194073178f293e20e8549ead5380 as web-builder
# renovate: datasource=github-tags depName=jellyfin/jellyfin-web versioning=semver
ENV JELLYFIN_WEB_VERSION v10.7.7
WORKDIR /jellyfin-web
RUN set -ex; \
git clone --branch $JELLYFIN_WEB_VERSION https://github.com/jellyfin/jellyfin-web.git .; \
npm install; \
npm run build:production; \
mv dist /dist;
FROM mcr.microsoft.com/dotnet/sdk:5.0.401-buster-slim@sha256:66c921c06b3f67aa7b809cf3549aa38da308ca8e2d472ee636077d4af725a1ec as builder
# renovate: datasource=github-tags depName=jellyfin/jellyfin versioning=semver
ENV JELLYFIN_VERSION v10.7.7
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
WORKDIR /repo
COPY jellyfin_livestream.patch /
# because of changes in docker and systemd we need to not build in parallel at the moment
# see https://success.docker.com/article/how-to-reserve-resource-temporarily-unavailable-errors-due-to-tasksmax-setting
RUN set -ex; \
git clone --branch $JELLYFIN_VERSION https://github.com/jellyfin/jellyfin.git .; \
git apply /jellyfin_livestream.patch; \
dotnet publish Jellyfin.Server --disable-parallel --configuration Release --output="/jellyfin" --self-contained --runtime linux-x64 "-p:DebugSymbols=false;DebugType=none";
FROM debian:buster-slim@sha256:a364ab17ed74911bf0913ce1099054e9bcbabc80bf0faae7dac4d3470b472e24
SHELL [ "/bin/bash", "-exo", "pipefail", "-c" ]
COPY --from=builder /jellyfin /jellyfin
COPY --from=web-builder /dist /jellyfin/jellyfin-web
# Install dependencies:
RUN apt-get update; \
apt-get install --no-install-recommends -y \
ca-certificates \
gnupg \
curl \
apt-transport-https \
; \
curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | apt-key add -; \
echo "deb [arch=amd64] https://repo.jellyfin.org/debian buster main" | tee /etc/apt/sources.list.d/jellyfin.list; \
apt-get update; \
apt-get install --no-install-recommends -y \
jellyfin-ffmpeg \
openssl \
locales \
; \
apt-get purge --autoremove -y \
gnupg \
wget \
apt-transport-https; \
rm -rf /var/lib/apt/lists/*; \
mkdir -p /cache /config /media; \
chmod 777 /cache /config /media; \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen; \
locale-gen;
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
COPY start-transcode.sh /usr/local/bin/start-transcode
EXPOSE 8096
VOLUME /cache /config /media
ENTRYPOINT ["./jellyfin/jellyfin", \
"--datadir", "/config", \
"--cachedir", "/cache", \
"--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"]