-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
76 lines (56 loc) · 2.35 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
76
ARG TARGETPLATFORM
ARG BUILDPLATFORM
# renovate: datasource=github-releases depName=jellyfin/jellyfin versioning=loose
ARG JELLYFIN_VERSION=10.10.3
ARG PROTOC_VERSION=28.2
FROM debian:bookworm-slim AS builder
ARG JELLYFIN_VERSION
ARG PROTOC_VERSION
# Setzen der Arbeitsverzeichnis im Container
WORKDIR /app
# Installieren von notwendigen Paketen
RUN apt-get update && apt-get install -y \
git \
curl \
unzip \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /app/.local
# Upgrade pip
RUN pip3 install --break-system-packages --upgrade pip
# Checkout latest master of grpc-ffmpeg
RUN git clone https://github.com/CrystalNET-org/grpc-ffmpeg.git && \
mv grpc-ffmpeg/src/proto/ffmpeg.proto .
# Kompilieren der .proto-Datei für Python
RUN python3 -m pip install --break-system-packages grpcio grpcio-tools
RUN PATH="$PATH:$HOME/app/.local/bin" python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ffmpeg.proto
FROM docker.io/jellyfin/jellyfin:${JELLYFIN_VERSION}
ARG JELLYFIN_VERSION
RUN sed -i 's/Components: main/Components: main contrib non-free/' /etc/apt/sources.list.d/debian.sources
COPY --from=builder /app/grpc-ffmpeg/src/client/grpc-ffmpeg.py /usr/local/bin/grpc-ffmpeg.py
COPY --from=builder /app/ffmpeg* /usr/local/bin/
RUN chmod a+x /usr/local/bin/grpc-ffmpeg.py && \
ln -s /usr/local/bin/grpc-ffmpeg.py /usr/local/bin/ffmpeg && \
ln -s /usr/local/bin/grpc-ffmpeg.py /usr/local/bin/ffprobe
RUN mkdir -p /run/shm /media
RUN apt-get update && apt-get install -y \
openssh-client \
python3-click \
python3-yaml \
libssl3 \
libc-bin \
ca-certificates \
wget \
python3-pip \
sqlite3 \
strace
RUN pip3 install --break-system-packages --upgrade pip
RUN python3 -m pip install --break-system-packages grpcio grpcio-tools aiofiles
RUN groupadd -g 64710 jellyfin && \
useradd -r -m -p '' -u 64710 -g 64710 -s "" -c 'User' jellyfin
EXPOSE 8096
VOLUME /config
ENTRYPOINT [ "/jellyfin/jellyfin", "--datadir", "/data", "--configdir", "/config", "--cachedir", "/cache", "--ffmpeg", "/usr/local/bin/ffmpeg" ]
LABEL org.opencontainers.image.source="https://github.com/CrystalNET-org/jellyfin"