2018-07-08 13:29:12 +00:00
|
|
|
FROM spritsail/libressl
|
2018-03-16 15:26:23 +00:00
|
|
|
|
|
|
|
ARG PLEX_VER=latest
|
|
|
|
ARG PLEX_URL
|
2018-03-16 15:49:26 +00:00
|
|
|
ARG PLEX_SHA
|
2018-03-29 23:31:38 +00:00
|
|
|
ARG LIBSTDCPP_VER=6.3.0-18+deb9u1
|
|
|
|
ARG LIBGCC1_VER=6.3.0-18+deb9u1
|
2018-03-16 15:26:23 +00:00
|
|
|
|
|
|
|
LABEL maintainer="Spritsail <plex@spritsail.io>" \
|
|
|
|
org.label-schema.vendor="Spritsail" \
|
|
|
|
org.label-schema.name="Plex Media Server" \
|
|
|
|
org.label-schema.url="https://www.plex.tv/downloads/" \
|
|
|
|
org.label-schema.description="Tiny Docker image for Plex Media Server, built on spritsail/busybox" \
|
|
|
|
org.label-schema.version=$PLEX_VER
|
2016-08-26 21:26:39 +00:00
|
|
|
|
2017-12-15 16:43:33 +00:00
|
|
|
ENV SUID=900 SGID=900
|
2017-06-02 21:22:00 +00:00
|
|
|
ADD start_pms /usr/sbin/start_pms
|
2016-08-26 21:26:39 +00:00
|
|
|
|
|
|
|
WORKDIR /tmp
|
|
|
|
|
2018-03-16 15:26:23 +00:00
|
|
|
RUN chmod +x /usr/sbin/start_pms \
|
2018-03-29 23:31:38 +00:00
|
|
|
&& wget http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBSTDCPP_VER:0:1}/libstdc++6_${LIBSTDCPP_VER}_amd64.deb \
|
|
|
|
&& wget http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBGCC1_VER:0:1}/libgcc1_${LIBGCC1_VER}_amd64.deb \
|
2017-05-12 00:39:07 +00:00
|
|
|
&& dpkg-deb -x libstdc++6*.deb . \
|
|
|
|
&& dpkg-deb -x libgcc1*.deb . \
|
|
|
|
# We only need the lib files, everything else is debian junk.
|
2018-03-16 15:26:23 +00:00
|
|
|
&& mv $PWD/usr/lib/x86_64-linux-gnu/* /lib \
|
|
|
|
&& mv $PWD/lib/x86_64-linux-gnu/* /lib \
|
|
|
|
\
|
|
|
|
&& if [ "$PLEX_VER" == "latest" -o -z "$PLEX_URL" ]; then \
|
|
|
|
export PLEX_VER="$(wget -qO- https://spritsail.io/plex/release.php?raw=version)"; \
|
|
|
|
export PLEX_URL="$(wget -qO- https://spritsail.io/plex/release.php?raw=url-deb)"; \
|
|
|
|
export PLEX_SHA="$(wget -qO- https://spritsail.io/plex/release.php?raw=csum-deb)"; \
|
2017-09-19 23:03:03 +00:00
|
|
|
fi \
|
2018-03-16 15:26:23 +00:00
|
|
|
&& echo "$PLEX_SHA plexmediaserver.deb" > sumfile \
|
|
|
|
&& wget -O plexmediaserver.deb "$PLEX_URL" \
|
|
|
|
&& sha1sum -c sumfile \
|
|
|
|
\
|
2017-05-11 11:57:46 +00:00
|
|
|
&& dpkg-deb -x plexmediaserver.deb . \
|
|
|
|
&& mv usr/lib/plexmediaserver /usr/lib \
|
2018-03-16 15:26:23 +00:00
|
|
|
&& find $PWD -mindepth 1 -delete
|
2016-08-26 21:26:39 +00:00
|
|
|
|
2018-03-16 15:26:23 +00:00
|
|
|
HEALTHCHECK --interval=10s --timeout=5s \
|
|
|
|
CMD [ "wget", "-O", "/dev/null", "-T", "10", "-q", "localhost:32400/identity" ]
|
2017-09-19 23:50:12 +00:00
|
|
|
|
2017-05-11 09:42:22 +00:00
|
|
|
WORKDIR /usr/lib/plexmediaserver
|
2016-08-26 21:26:39 +00:00
|
|
|
|
2017-05-11 09:42:22 +00:00
|
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
2017-05-14 20:41:46 +00:00
|
|
|
CMD ["start_pms"]
|