forked from linuxserver/docker-plex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
79 lines (73 loc) · 2.87 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
77
78
79
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
# set version label
ARG BUILD_DATE
ARG VERSION
ARG PLEX_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
# global environment settings
ENV DEBIAN_FRONTEND="noninteractive" \
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" \
PLEX_ARCH="amd64" \
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
PLEX_MEDIA_SERVER_USER="abc" \
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
RUN \
echo "**** add Intel repo ****" && \
curl -sL https://repositories.intel.com/graphics/intel-graphics.key | apt-key add - && \
echo 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' > /etc/apt/sources.list.d/intel.list && \
echo "**** install runtime packages ****" && \
apt-get update && apt-get dist-upgrade -y && \
apt-get install -y \
jq \
iptables \
intel-opencl-icd \
nano \
udev \
unrar \
wget && \
COMP_RT_RELEASE=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/latest" | jq -r '.tag_name') && \
COMP_RT_URLS=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/tags/${COMP_RT_RELEASE}" | jq -r '.body' | grep wget | sed 's|wget ||g') && \
mkdir -p /opencl-intel && \
for i in ${COMP_RT_URLS}; do \
i=$(echo ${i} | tr -d '\r'); \
echo "**** downloading ${i} ****"; \
curl -o "/opencl-intel/$(basename ${i})" \
-L "${i}"; \
done && \
dpkg -i /opencl-intel/*.deb && \
rm -rf /opencl-intel && \
echo "**** install cloudflared ****" && \
mkdir -p /cloudflared-temp && \
wget -O /cloudflared-temp/cloudflared-stable-linux-amd64.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && \
dpkg -i /cloudflared-temp/*.deb && \
rm -rf /cloudflared-temp && \
echo "**** install plex ****" && \
if [ -z ${PLEX_RELEASE+x} ]; then \
PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' \
| jq -r '.computer.Linux.version'); \
fi && \
curl -o \
/tmp/plexmediaserver.deb -L \
"${PLEX_DOWNLOAD}/${PLEX_RELEASE}/debian/plexmediaserver_${PLEX_RELEASE}_${PLEX_ARCH}.deb" && \
dpkg -i /tmp/plexmediaserver.deb && \
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/*
# add local files
COPY root/ /
# ports and volumes
EXPOSE 32400/tcp 1900/udp 3005/tcp 5353/udp 8324/tcp 32410/udp 32412/udp 32413/udp 32414/udp 32469/tcp
VOLUME /config
VOLUME /argo