forked from wernight/docker-plex-media-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (40 loc) · 1.55 KB
/
Dockerfile
File metadata and controls
54 lines (40 loc) · 1.55 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
FROM debian:jessie
# Install required packages
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*
# Create plex user
RUN useradd --system --uid 797 -M --shell /usr/sbin/nologin plex
# Hack to avoid install to fail due to upstart not being installed.
# We won't use upstart anyway.
RUN touch /bin/start
RUN chmod +x /bin/start
# Download and install Plex (non plexpass)
# This gets the latest non-plexpass version
RUN DOWNLOAD_URL='https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu' && \
echo $DOWNLOAD_URL && \
curl -L $DOWNLOAD_URL -o plexmediaserver.deb
RUN dpkg -i plexmediaserver.deb
RUN rm -f plexmediaserver.deb
# Hack clean-up
RUN rm -f /bin/start
# Create writable config directory in case the volume isn't mounted
RUN mkdir /config
RUN chown plex:plex /config
VOLUME /config
VOLUME /media
USER plex
EXPOSE 32400
# the number of plugins that can run at the same time
ENV PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS 6
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
ENV PLEX_MEDIA_SERVER_MAX_STACK_SIZE 3000
# location of configuration, default is
# "${HOME}/Library/Application Support"
ENV PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR /config
ENV PLEX_MEDIA_SERVER_HOME /usr/lib/plexmediaserver
ENV LD_LIBRARY_PATH /usr/lib/plexmediaserver
ENV TMPDIR /tmp
WORKDIR /usr/lib/plexmediaserver
CMD test -f /config/Plex\ Media\ Server/plexmediaserver.pid && rm -f /config/Plex\ Media\ Server/plexmediaserver.pid; \
ulimit -s $PLEX_MAX_STACK_SIZE && ./Plex\ Media\ Server