-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.patch
61 lines (56 loc) · 2.1 KB
/
Dockerfile.patch
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
diff --git a/Dockerfile b/Dockerfile
index 26a889b..a5d833f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
+FROM ghcr.io/linuxserver/baseimage-alpine:edge
# set version label
ARG BUILD_DATE
@@ -23,12 +23,13 @@ ENV DEBIAN_FRONTEND="noninteractive" \
RUN \
echo "**** install runtime packages ****" && \
- apt-get update && \
- apt-get install -y \
+ apk add --no-cache --update-cache \
jq \
udev \
- unrar \
+ dpkg \
+ grep \
wget && \
+ dpkg --add-architecture amd64 && \
echo "**** install plex ****" && \
if [ -z ${PLEX_RELEASE+x} ]; then \
PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' \
@@ -41,13 +42,15 @@ RUN \
echo "**** ensure abc user's home folder is /app ****" && \
usermod -d /app abc && \
echo "**** cleanup ****" && \
- apt-get clean && \
rm -rf \
/etc/default/plexmediaserver \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
+RUN apk add mesa-va-gallium --no-cache --update-cache \
+ && apk add libva-utils --no-cache --update-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
+
# add local files
COPY root/ /
diff --git a/root/etc/s6-overlay/s6-rc.d/svc-plex/run b/root/etc/s6-overlay/s6-rc.d/svc-plex/run
old mode 100755
new mode 100644
index 8486676..5f609ad
--- a/root/etc/s6-overlay/s6-rc.d/svc-plex/run
+++ b/root/etc/s6-overlay/s6-rc.d/svc-plex/run
@@ -1,5 +1,10 @@
#!/usr/bin/with-contenv bash
+#force library dependencies
+export LD_LIBRARY_PATH=/lib #required to use /lib/ld-musl.x86_64.so instead of Plex's version
+export LD_PRELOAD=/usr/lib/libva.so.2:/usr/lib/plexmediaserver/lib/libssl.so.3:/usr/lib/plexmediaserver/lib/libcrypto.so.3 #use system libva (required for system drivers) but dont use system libssl/libcrypto (required for Plex's libpython)
+export LIBVA_DRIVERS_PATH=/usr/lib/dri #use system VA-API drivers instead of Plex's ones
+
echo "Starting Plex Media Server. . . (you can ignore the libusb_init error)"
export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)