2023-06-19 18:08:09 +00:00
|
|
|
ARG PLEX_VER=1.32.4.7195-7c8f9d3b6
|
2023-06-02 09:40:33 +00:00
|
|
|
ARG BUSYBOX_VER=1.36.1
|
2021-04-28 21:18:44 +00:00
|
|
|
ARG SU_EXEC_VER=0.4
|
|
|
|
ARG TINI_VER=0.19.0
|
2022-10-19 13:32:27 +00:00
|
|
|
ARG ZLIB_VER=1.2.13
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG LIBXML2_VER=2.10.3
|
|
|
|
ARG LIBXSLT_VER=1.1.37
|
2021-04-28 21:18:44 +00:00
|
|
|
ARG XMLSTAR_VER=1.6.1
|
2023-06-02 09:40:33 +00:00
|
|
|
ARG OPENSSL_VER=3.0.9
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG NGHTTP2_VER=1.52.0
|
2023-06-02 09:40:33 +00:00
|
|
|
ARG CURL_VER=8.1.2
|
2021-04-28 21:18:44 +00:00
|
|
|
|
|
|
|
ARG OUTPUT=/output
|
|
|
|
ARG DESTDIR=/prefix
|
|
|
|
|
2023-05-23 09:39:01 +00:00
|
|
|
ARG CFLAGS="-O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -flto=auto"
|
2021-04-28 21:18:44 +00:00
|
|
|
ARG LDFLAGS="$CFLAGS -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
|
|
|
|
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2023-05-23 09:03:47 +00:00
|
|
|
FROM spritsail/alpine:3.18 AS builder
|
2018-03-16 15:26:23 +00:00
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
RUN apk add --no-cache \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
binutils \
|
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
dpkg \
|
|
|
|
file \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
libtool \
|
|
|
|
linux-headers \
|
|
|
|
make \
|
|
|
|
musl-dev \
|
|
|
|
nghttp2-dev \
|
|
|
|
pkgconfig \
|
|
|
|
xxd
|
|
|
|
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
FROM builder AS plex
|
2018-07-08 14:04:02 +00:00
|
|
|
|
|
|
|
ARG PLEX_VER
|
2021-04-28 21:18:44 +00:00
|
|
|
ARG OUTPUT
|
2019-08-24 13:17:18 +00:00
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
WORKDIR $OUTPUT
|
2019-08-23 20:56:13 +00:00
|
|
|
|
|
|
|
# Fetch Plex and required libraries
|
2022-06-19 15:03:35 +00:00
|
|
|
RUN if [ "$(uname -m)" = "aarch64" ]; then \
|
|
|
|
ARCH=arm64; LIB_DIRS=lib/omx; \
|
|
|
|
else \
|
2023-05-09 15:11:27 +00:00
|
|
|
ARCH=amd64; \
|
2022-06-19 15:03:35 +00:00
|
|
|
fi \
|
|
|
|
&& curl -fsSL -o plexmediaserver.deb https://downloads.plex.tv/plex-media-server-new/${PLEX_VER}/debian/plexmediaserver_${PLEX_VER}_${ARCH}.deb \
|
2019-08-23 20:56:13 +00:00
|
|
|
&& dpkg-deb -x plexmediaserver.deb . \
|
|
|
|
\
|
2022-06-19 15:03:35 +00:00
|
|
|
&& rm -rfv \
|
2020-04-10 22:37:34 +00:00
|
|
|
etc/ usr/share/ \
|
2022-06-19 15:03:35 +00:00
|
|
|
usr/lib/plexmediaserver/etc \
|
2019-08-24 13:17:18 +00:00
|
|
|
plexmediaserver.deb \
|
|
|
|
\
|
2019-08-23 20:56:13 +00:00
|
|
|
&& cd usr/lib/plexmediaserver \
|
2022-06-19 15:03:35 +00:00
|
|
|
&& rm -v \
|
2019-08-23 20:56:13 +00:00
|
|
|
lib/libcrypto.so* \
|
|
|
|
lib/libcurl.so* \
|
|
|
|
lib/libssl.so* \
|
2021-04-28 21:18:44 +00:00
|
|
|
lib/libnghttp2.so* \
|
2020-02-03 22:14:54 +00:00
|
|
|
lib/plexmediaserver.* \
|
2019-08-23 20:56:13 +00:00
|
|
|
Resources/start.sh \
|
2021-04-28 21:18:44 +00:00
|
|
|
\
|
2019-08-23 20:56:13 +00:00
|
|
|
# Place shared libraries in usr/lib so they can be actually shared
|
2022-06-19 15:03:35 +00:00
|
|
|
&& mv lib/*.so* $LIB_DIRS ../ \
|
|
|
|
&& rmdir lib \
|
2021-04-28 21:18:44 +00:00
|
|
|
&& ln -sv ../ lib \
|
|
|
|
# Replace hardlink with a symlink; these files are the same
|
2022-06-19 15:03:35 +00:00
|
|
|
&& cd .. && ln -sfvn "ld-musl-$(uname -m).so.1" libc.so
|
2021-04-28 21:18:44 +00:00
|
|
|
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
FROM builder AS busybox
|
|
|
|
|
|
|
|
ARG CFLAGS
|
|
|
|
ARG LDFLAGS
|
|
|
|
ARG MAKEFLAGS
|
|
|
|
ARG OUTPUT
|
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG BUSYBOX_VER
|
2021-04-28 21:18:44 +00:00
|
|
|
WORKDIR /tmp/busybox
|
|
|
|
|
|
|
|
RUN curl -fsSL https://busybox.net/downloads/busybox-${BUSYBOX_VER}.tar.bz2 \
|
|
|
|
| tar xj --strip-components=1 \
|
|
|
|
&& make defconfig \
|
|
|
|
&& make \
|
|
|
|
&& install -Dm755 busybox "$OUTPUT/usr/bin/busybox" \
|
|
|
|
# "Install" busybox, creating symlinks to all binaries it provides
|
|
|
|
&& mkdir -p "$OUTPUT/usr/bin" "$OUTPUT/usr/sbin" \
|
|
|
|
&& ./busybox --list-full | sed -E 's@^(s?bin)@usr/\1@' | xargs -i ln -Tsv /usr/bin/busybox "$OUTPUT/{}"
|
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG SU_EXEC_VER
|
2021-04-28 21:18:44 +00:00
|
|
|
WORKDIR /tmp/su-exec
|
|
|
|
|
|
|
|
RUN curl -fL https://github.com/frebib/su-exec/archive/v${SU_EXEC_VER}.tar.gz \
|
|
|
|
| tar xz --strip-components=1 \
|
|
|
|
&& make \
|
|
|
|
&& install -Dm755 su-exec "$OUTPUT/usr/sbin/su-exec"
|
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG TINI_VER
|
2021-04-28 21:18:44 +00:00
|
|
|
WORKDIR /tmp/tini
|
|
|
|
|
|
|
|
RUN curl -fL https://github.com/krallin/tini/archive/v${TINI_VER}.tar.gz \
|
|
|
|
| tar xz --strip-components=1 \
|
|
|
|
&& cmake . \
|
|
|
|
&& make tini \
|
|
|
|
&& install -Dm755 tini "$OUTPUT/usr/sbin/tini"
|
|
|
|
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
FROM builder AS zlib
|
|
|
|
|
|
|
|
ARG CFLAGS
|
|
|
|
ARG LDFLAGS
|
|
|
|
ARG MAKEFLAGS
|
|
|
|
ARG OUTPUT
|
|
|
|
ARG DESTDIR
|
2019-08-23 20:56:13 +00:00
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG ZLIB_VER
|
2019-02-13 23:10:42 +00:00
|
|
|
WORKDIR /tmp/zlib
|
2021-04-28 21:18:44 +00:00
|
|
|
|
2019-02-13 23:10:42 +00:00
|
|
|
RUN curl -sSf https://www.zlib.net/zlib-$ZLIB_VER.tar.xz \
|
|
|
|
| tar xJ --strip-components=1 \
|
|
|
|
&& ./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--shared \
|
2023-05-13 10:35:46 +00:00
|
|
|
&& make install \
|
2021-04-28 21:18:44 +00:00
|
|
|
&& make DESTDIR="$DESTDIR" install \
|
|
|
|
&& mkdir -p "$OUTPUT/usr/lib" \
|
2023-05-13 10:35:46 +00:00
|
|
|
&& cp -aP "$DESTDIR"/usr/lib/*.so* "$OUTPUT/usr/lib"
|
2021-04-28 21:18:44 +00:00
|
|
|
|
|
|
|
ARG LIBXML2_VER
|
2018-08-19 15:22:31 +00:00
|
|
|
WORKDIR /tmp/libxml2
|
2023-05-13 10:35:46 +00:00
|
|
|
|
|
|
|
RUN git clone https://gitlab.gnome.org/GNOME/libxml2.git --branch v$LIBXML2_VER --depth 1 . \
|
2018-08-19 15:22:31 +00:00
|
|
|
&& ./autogen.sh \
|
|
|
|
--prefix=/usr \
|
2021-04-28 21:18:44 +00:00
|
|
|
--with-zlib="$DESTDIR/usr" \
|
2018-08-19 19:24:29 +00:00
|
|
|
--without-catalog \
|
|
|
|
--without-docbook \
|
|
|
|
--without-ftp \
|
|
|
|
--without-http \
|
|
|
|
--without-iconv \
|
|
|
|
--without-iso8859x \
|
|
|
|
--without-legacy \
|
|
|
|
--without-modules \
|
2018-08-19 15:22:31 +00:00
|
|
|
--without-python \
|
2023-05-13 10:35:46 +00:00
|
|
|
&& make install \
|
2021-04-28 21:18:44 +00:00
|
|
|
&& make DESTDIR="$DESTDIR" install \
|
2023-05-13 10:35:46 +00:00
|
|
|
&& cp -aP "$DESTDIR"/usr/lib/*.so* "$OUTPUT/usr/lib"
|
|
|
|
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
FROM zlib AS xml
|
2018-08-19 15:22:31 +00:00
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG CFLAGS
|
|
|
|
ARG LDFLAGS
|
|
|
|
ARG MAKEFLAGS
|
|
|
|
ARG OUTPUT
|
|
|
|
ARG DESTDIR
|
|
|
|
|
|
|
|
ARG LIBXSLT_VER
|
2018-08-19 15:22:31 +00:00
|
|
|
WORKDIR /tmp/libxslt
|
2023-05-13 10:35:46 +00:00
|
|
|
|
|
|
|
RUN git clone https://gitlab.gnome.org/GNOME/libxslt.git --branch v$LIBXSLT_VER --depth 1 . \
|
2018-08-19 15:22:31 +00:00
|
|
|
&& ./autogen.sh \
|
|
|
|
--prefix=/usr \
|
2021-04-28 21:18:44 +00:00
|
|
|
--with-libxml-src=../libxml2 \
|
2018-08-19 19:24:29 +00:00
|
|
|
--without-crypto \
|
|
|
|
--without-plugins \
|
2018-08-19 15:22:31 +00:00
|
|
|
--without-python \
|
2021-04-28 21:18:44 +00:00
|
|
|
&& make DESTDIR="$DESTDIR" install \
|
2023-05-13 10:35:46 +00:00
|
|
|
&& cp -aP "$DESTDIR"/usr/lib/*.so* "$OUTPUT/usr/lib"
|
2018-08-09 09:59:39 +00:00
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG XMLSTAR_VER
|
2018-08-19 20:08:34 +00:00
|
|
|
ADD xmlstarlet-*.patch /tmp
|
2018-08-09 09:59:39 +00:00
|
|
|
WORKDIR /tmp/xmlstarlet
|
2023-05-13 10:35:46 +00:00
|
|
|
|
2018-08-09 09:59:39 +00:00
|
|
|
RUN git clone git://git.code.sf.net/p/xmlstar/code --branch $XMLSTAR_VER --depth 1 . \
|
|
|
|
&& git apply /tmp/xmlstarlet*.patch \
|
|
|
|
&& autoreconf -sif \
|
|
|
|
&& ./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--disable-build-docs \
|
2021-04-28 21:18:44 +00:00
|
|
|
--with-libxml-prefix="$DESTDIR/usr" \
|
|
|
|
--with-libxslt-prefix="$DESTDIR/usr" \
|
|
|
|
&& make DESTDIR="$DESTDIR" install \
|
|
|
|
&& install -Dm755 "$DESTDIR/usr/bin/xml" "$OUTPUT/usr/bin/xmlstarlet"
|
|
|
|
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
FROM zlib AS curl
|
2021-04-28 21:18:44 +00:00
|
|
|
|
|
|
|
ARG CFLAGS
|
|
|
|
ARG LDFLAGS
|
|
|
|
ARG MAKEFLAGS
|
|
|
|
ARG OUTPUT
|
|
|
|
ARG DESTDIR
|
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG OPENSSL_VER
|
2020-01-08 17:20:19 +00:00
|
|
|
WORKDIR /tmp/openssl
|
2023-05-13 10:35:46 +00:00
|
|
|
|
2020-01-08 17:20:19 +00:00
|
|
|
RUN curl -sSL https://openssl.org/source/openssl-${OPENSSL_VER}.tar.gz \
|
2018-08-09 09:59:39 +00:00
|
|
|
| tar xz --strip-components=1 \
|
2020-01-08 17:20:19 +00:00
|
|
|
&& ./config \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libdir=lib \
|
2021-04-28 21:18:44 +00:00
|
|
|
--with-zlib-lib="$DESTDIR/usr/lib" \
|
|
|
|
--with-zlib-include="$DESTDIR/usr/include" \
|
2020-01-08 17:20:19 +00:00
|
|
|
shared \
|
|
|
|
zlib-dynamic \
|
2021-04-28 21:18:44 +00:00
|
|
|
no-engine \
|
2020-01-08 17:20:19 +00:00
|
|
|
no-rc5 \
|
2021-01-04 09:42:26 +00:00
|
|
|
no-ssl3-method \
|
|
|
|
&& make build_libs \
|
|
|
|
&& make build_programs \
|
2021-04-28 21:18:44 +00:00
|
|
|
&& make DESTDIR="$DESTDIR" \
|
2020-05-12 08:49:18 +00:00
|
|
|
install_sw \
|
|
|
|
install_ssldirs \
|
2023-05-13 10:35:46 +00:00
|
|
|
&& make install_sw install_ssldirs \
|
|
|
|
&& cp -aP "$DESTDIR"/usr/lib/*.so* "$OUTPUT/usr/lib" \
|
2021-04-28 21:18:44 +00:00
|
|
|
&& sed -i "s@prefix=/usr@prefix=$DESTDIR/usr@g" "$DESTDIR"/usr/lib/pkgconfig/*.pc
|
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG NGHTTP2_VER
|
|
|
|
WORKDIR /tmp/libnghttp2
|
|
|
|
|
|
|
|
RUN git clone https://github.com/nghttp2/nghttp2.git -b v$NGHTTP2_VER --depth 1 . \
|
|
|
|
&& autoreconf -i \
|
|
|
|
&& ./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--enable-lib-only \
|
|
|
|
--with-libxml2=yes \
|
|
|
|
--with-openssl=yes \
|
|
|
|
--with-zlib=yes \
|
|
|
|
&& make DESTDIR="$DESTDIR" install \
|
|
|
|
&& cp -aP "$DESTDIR"/usr/lib/libnghttp2*.so* "$OUTPUT/usr/lib"
|
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
# /usr/lib # curl --version
|
2023-05-13 10:50:10 +00:00
|
|
|
# curl 8.0.1 (x86_64-pc-linux-musl) libcurl/8.0.1 OpenSSL/3.0.8 zlib/1.2.13 nghttp2/1.52.0
|
|
|
|
# Release-Date: 2023-03-20
|
2021-04-28 21:18:44 +00:00
|
|
|
# Protocols: http https
|
2023-05-13 10:50:10 +00:00
|
|
|
# Features: alt-svc AsynchDNS HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz SSL threadsafe UnixSockets
|
2018-08-09 09:59:39 +00:00
|
|
|
|
2023-05-13 10:35:46 +00:00
|
|
|
ARG CURL_VER
|
2018-08-09 09:59:39 +00:00
|
|
|
WORKDIR /tmp/curl
|
2023-05-13 10:50:10 +00:00
|
|
|
RUN export CURL_TAG=curl-${CURL_VER//./_} \
|
|
|
|
&& git clone https://github.com/curl/curl.git --branch $CURL_TAG --depth 1 . \
|
|
|
|
&& sed -i \
|
|
|
|
-e "/\WLIBCURL_VERSION\W/c #define LIBCURL_VERSION \"$CURL_VER\"" \
|
|
|
|
-e "/\WLIBCURL_TIMESTAMP\W/c #define LIBCURL_TIMESTAMP \"$(git log -1 --format=%cs "$CURL_TAG")\"" \
|
|
|
|
include/curl/curlver.h \
|
2018-08-09 09:59:39 +00:00
|
|
|
&& autoreconf -sif \
|
|
|
|
&& ./configure \
|
|
|
|
--prefix=/usr \
|
2021-04-28 21:18:44 +00:00
|
|
|
--enable-http \
|
2018-08-09 09:59:39 +00:00
|
|
|
--enable-ipv6 \
|
2021-04-28 21:18:44 +00:00
|
|
|
--enable-largefile \
|
|
|
|
--enable-proxy \
|
|
|
|
--enable-unix-sockets \
|
2023-05-13 10:35:46 +00:00
|
|
|
--with-libnghttp2="$DESTDIR/usr" \
|
2021-04-28 21:18:44 +00:00
|
|
|
--with-ssl="$DESTDIR/usr" \
|
|
|
|
--with-zlib="$DESTDIR/usr" \
|
2018-08-09 09:59:39 +00:00
|
|
|
--enable-optimize \
|
|
|
|
--enable-symbol-hiding \
|
|
|
|
--enable-versioned-symbols \
|
|
|
|
--enable-threaded-resolver \
|
2021-04-28 21:18:44 +00:00
|
|
|
--disable-cookies \
|
2018-08-09 09:59:39 +00:00
|
|
|
--disable-crypto-auth \
|
|
|
|
--disable-curldebug \
|
|
|
|
--disable-dependency-tracking \
|
|
|
|
--disable-dict \
|
2021-04-28 21:18:44 +00:00
|
|
|
--disable-file \
|
|
|
|
--disable-ftp \
|
2018-08-09 09:59:39 +00:00
|
|
|
--disable-gopher \
|
|
|
|
--disable-imap \
|
|
|
|
--disable-ldap \
|
|
|
|
--disable-ldaps \
|
2021-04-28 21:18:44 +00:00
|
|
|
--disable-libcurl-option \
|
2018-08-09 09:59:39 +00:00
|
|
|
--disable-manual \
|
2021-04-28 21:18:44 +00:00
|
|
|
--disable-mqtt \
|
2018-08-09 09:59:39 +00:00
|
|
|
--disable-ntlm-wb \
|
|
|
|
--disable-pop3 \
|
|
|
|
--disable-rtsp \
|
|
|
|
--disable-smb \
|
|
|
|
--disable-smtp \
|
|
|
|
--disable-sspi \
|
|
|
|
--disable-telnet \
|
|
|
|
--disable-tftp \
|
|
|
|
--disable-tls-srp \
|
|
|
|
--disable-verbose \
|
|
|
|
--without-axtls \
|
|
|
|
--without-libpsl \
|
|
|
|
--without-librtmp \
|
|
|
|
--without-winidn \
|
2021-04-28 21:18:44 +00:00
|
|
|
&& make DESTDIR="$DESTDIR" install \
|
|
|
|
&& install -Dm755 "$DESTDIR/usr/bin/curl" "$OUTPUT/usr/bin/curl" \
|
2023-05-13 10:35:46 +00:00
|
|
|
&& cp -aP "$DESTDIR"/usr/lib/*.so* "$OUTPUT/usr/lib"
|
2019-08-24 13:17:18 +00:00
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2018-08-09 09:59:39 +00:00
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
FROM builder AS combine
|
|
|
|
|
|
|
|
ARG OUTPUT
|
|
|
|
WORKDIR $OUTPUT
|
2018-08-09 09:59:39 +00:00
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
COPY --from=plex "$OUTPUT" .
|
|
|
|
COPY --from=busybox "$OUTPUT" .
|
|
|
|
COPY --from=xml "$OUTPUT" .
|
|
|
|
COPY --from=curl "$OUTPUT" .
|
|
|
|
|
|
|
|
RUN install -m 1777 -o root -g root -d tmp \
|
|
|
|
&& ln -sv /usr/lib /usr/bin /usr/sbin . \
|
|
|
|
# Link Plex ca-certificates as system store so curl and others can use them too
|
|
|
|
&& mkdir -p etc/ssl/certs \
|
|
|
|
&& ln -sv /usr/lib/plexmediaserver/Resources/cacert.pem etc/ssl/certs/ca-certificates.crt \
|
2018-08-09 09:59:39 +00:00
|
|
|
# Strip all unneeded symbols for optimum size
|
2021-04-28 21:18:44 +00:00
|
|
|
&& find . -type f -exec sh -c 'file "{}" | grep -q ELF && strip --strip-debug "{}"' \;
|
2018-07-08 14:04:02 +00:00
|
|
|
|
2021-02-05 09:21:54 +00:00
|
|
|
ADD --chmod=755 \
|
|
|
|
entrypoint \
|
2021-04-28 21:18:44 +00:00
|
|
|
claim-server.sh \
|
|
|
|
gen-config.sh \
|
|
|
|
plex-util.sh \
|
|
|
|
usr/bin/
|
2018-07-08 14:04:02 +00:00
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2018-07-08 14:04:02 +00:00
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
FROM scratch
|
2018-07-08 14:04:02 +00:00
|
|
|
|
|
|
|
ARG PLEX_VER
|
2018-08-09 09:59:39 +00:00
|
|
|
ARG XMLSTAR_VER
|
2021-04-28 21:18:44 +00:00
|
|
|
ARG BUSYBOX_VER
|
|
|
|
ARG SU_EXEC_VER
|
|
|
|
ARG TINI_VER
|
|
|
|
ARG OPENSSL_VER
|
|
|
|
ARG CURL_VER
|
|
|
|
ARG OUTPUT
|
2018-07-08 14:04:02 +00:00
|
|
|
|
2022-12-18 19:54:16 +00:00
|
|
|
LABEL org.opencontainers.image.authors="Spritsail <plex@spritsail.io>" \
|
|
|
|
org.opencontainers.image.title="Plex Media Server" \
|
|
|
|
org.opencontainers.image.url="https://www.plex.tv/downloads/" \
|
|
|
|
org.opencontainers.image.description="Tiny Docker image for Plex Media Server, built on busybox" \
|
|
|
|
org.opencontainers.image.version=${PLEX_VER} \
|
2018-07-08 13:30:52 +00:00
|
|
|
io.spritsail.version.plex=${PLEX_VER} \
|
2021-04-28 21:18:44 +00:00
|
|
|
io.spritsail.version.xmlstarlet=${XMLSTAR_VER} \
|
|
|
|
io.spritsail.version.busybox=${BUSYBOX_VER} \
|
|
|
|
io.spritsail.version.su-exec=${SU_EXEC_VER} \
|
|
|
|
io.spritsail.version.tini=${TINI_VER} \
|
2020-01-08 17:20:19 +00:00
|
|
|
io.spritsail.version.openssl=${OPENSSL_VER} \
|
2021-04-28 21:18:44 +00:00
|
|
|
io.spritsail.version.curl=${CURL_VER}
|
2016-08-26 21:26:39 +00:00
|
|
|
|
2018-08-19 19:27:47 +00:00
|
|
|
WORKDIR /usr/lib/plexmediaserver
|
2016-08-26 21:26:39 +00:00
|
|
|
|
2021-04-28 21:18:44 +00:00
|
|
|
COPY --from=combine "$OUTPUT" /
|
2016-08-26 21:26:39 +00:00
|
|
|
|
2018-08-19 19:27:47 +00:00
|
|
|
ENV SUID=900 SGID=900 \
|
|
|
|
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
|
|
|
|
PLEX_MEDIA_SERVER_MAX_STACK_SIZE="3000" \
|
|
|
|
PLEX_MEDIA_SERVER_TMPDIR="/tmp" \
|
|
|
|
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
|
|
|
|
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/var/lib/plexmediaserver"
|
|
|
|
|
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
|
|
|
|
2018-07-08 14:04:02 +00:00
|
|
|
EXPOSE 32400
|
|
|
|
|
2018-08-19 19:27:47 +00:00
|
|
|
VOLUME ["/config", "/transcode"]
|
|
|
|
|
|
|
|
RUN mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" \
|
|
|
|
&& ln -sfv /config "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server"
|
|
|
|
|
2017-05-11 09:42:22 +00:00
|
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
2021-04-28 21:18:44 +00:00
|
|
|
CMD ["/usr/bin/entrypoint"]
|