-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile
49 lines (42 loc) · 1.7 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
FROM debian:jessie
# 1. Create plex user
# 2. Download and install Plex (non plexpass)
# 3. Create writable config directory in case the volume isn't mounted
# 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.
RUN set -x \
&& useradd --system --uid 797 -M --shell /usr/sbin/nologin plex \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
xmlstarlet \
&& curl -L 'https://downloads.plex.tv/plex-media-server/0.9.15.6.1714-7be11e1/plexmediaserver_0.9.15.6.1714-7be11e1_amd64.deb' -o plexmediaserver.deb \
&& touch /bin/start \
&& chmod +x /bin/start \
&& dpkg -i plexmediaserver.deb \
&& rm -f plexmediaserver.deb \
&& rm -f /bin/start \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& 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 *.sh Preferences.xml /
VOLUME /config
VOLUME /media
EXPOSE 32400
USER plex
WORKDIR /usr/lib/plexmediaserver
ENTRYPOINT ["/entrypoint.sh"]
CMD ./Plex\ Media\ Server