-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (49 loc) · 2.07 KB
/
Dockerfile
File metadata and controls
57 lines (49 loc) · 2.07 KB
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
FROM debian:buster-slim
# Install basic required packages.
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dumb-init \
xmlstarlet \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN set -x \
# Upgrade to get possible critical fixes.
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
# Create plex user
&& useradd --system --uid 797 --create-home --shell /usr/sbin/nologin plex \
# Download and install Plex (non plexpass) after displaying downloaded URL in the log.
# This gets the latest non-plexpass version
# Note: We created a dummy /bin/start to avoid install to fail due to upstart not being installed.
# We won't use upstart anyway.
&& curl -L 'https://downloads.plex.tv/plex-media-server-new/1.19.5.3112-b23ab3896/debian/plexmediaserver_1.19.5.3112-b23ab3896_amd64.deb' -o plexmediaserver.deb \
&& touch /bin/start \
&& chmod +x /bin/start \
&& dpkg -i plexmediaserver.deb \
&& rm -f plexmediaserver.deb \
&& rm -f /bin/start \
# Create writable config directory in case the volume isn't mounted
&& mkdir /config \
&& chown plex:plex /config
# PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS: The number of plugins that can run at the same time.
# PLEX_MEDIA_SERVER_MAX_STACK_SIZE: Used for "ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE".
# PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR: defines the location of the configuration directory,
# default is "${HOME}/Library/Application Support".
ENV PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6 \
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000 \
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/config \
PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver \
LD_LIBRARY_PATH=/usr/lib/plexmediaserver \
TMPDIR=/tmp
COPY root /
VOLUME ["/config", "/media"]
EXPOSE 32400
USER plex
WORKDIR /usr/lib/plexmediaserver
ENTRYPOINT ["dumb-init", "/plex-entrypoint.sh"]
CMD ["/usr/lib/plexmediaserver/Plex Media Server"]