mirror of
https://github.com/spritsail/plex-media-server.git
synced 2024-11-05 01:16:23 +00:00
Download Plex first, to catch failing builds sooner
This commit is contained in:
parent
878dc6c1e7
commit
0cd9b2d3a5
42
Dockerfile
42
Dockerfile
@ -16,6 +16,28 @@ ARG LIBRE_VER
|
||||
ARG CURL_VER
|
||||
ARG ZLIB_VER
|
||||
|
||||
WORKDIR /prefix
|
||||
|
||||
# Fetch Plex and required libraries
|
||||
RUN curl -fsSL -o plexmediaserver.deb https://downloads.plex.tv/plex-media-server-new/${PLEX_VER}/debian/plexmediaserver_${PLEX_VER}_amd64.deb \
|
||||
&& echo "$PLEX_SHA plexmediaserver.deb" | sha1sum -c - \
|
||||
&& dpkg-deb -x plexmediaserver.deb . \
|
||||
\
|
||||
&& cd usr/lib/plexmediaserver \
|
||||
&& rm -f \
|
||||
"Plex Media Server Tests" \
|
||||
MigratePlexServerConfig.sh \
|
||||
lib/libcrypto.so* \
|
||||
lib/libcurl.so* \
|
||||
lib/libssl.so* \
|
||||
lib/libxml2.so* \
|
||||
lib/libxslt.so* \
|
||||
lib/libz.so* \
|
||||
Resources/start.sh \
|
||||
# Place shared libraries in usr/lib so they can be actually shared
|
||||
&& mv lib/* ../ \
|
||||
&& cp /lib/x86_64-linux-gnu/libgcc_s.so.1 lib/
|
||||
|
||||
# Download and build zlib
|
||||
WORKDIR /tmp/zlib
|
||||
RUN curl -sSf https://www.zlib.net/zlib-$ZLIB_VER.tar.xz \
|
||||
@ -117,26 +139,6 @@ RUN git clone https://github.com/curl/curl.git --branch $CURL_VER --depth 1 . \
|
||||
|
||||
WORKDIR /prefix
|
||||
|
||||
# Fetch Plex and required libraries
|
||||
RUN curl -fsSL -o plexmediaserver.deb https://downloads.plex.tv/plex-media-server-new/${PLEX_VER}/debian/plexmediaserver_${PLEX_VER}_amd64.deb \
|
||||
&& echo "$PLEX_SHA plexmediaserver.deb" | sha1sum -c - \
|
||||
&& dpkg-deb -x plexmediaserver.deb . \
|
||||
\
|
||||
&& cd usr/lib/plexmediaserver \
|
||||
&& rm -f \
|
||||
"Plex Media Server Tests" \
|
||||
MigratePlexServerConfig.sh \
|
||||
lib/libcrypto.so* \
|
||||
lib/libcurl.so* \
|
||||
lib/libssl.so* \
|
||||
lib/libxml2.so* \
|
||||
lib/libxslt.so* \
|
||||
lib/libz.so* \
|
||||
Resources/start.sh \
|
||||
# Place shared libraries in usr/lib so they can be actually shared
|
||||
&& mv lib/* ../ \
|
||||
&& cp /lib/x86_64-linux-gnu/libgcc_s.so.1 lib/
|
||||
|
||||
# Strip all unneeded symbols for optimum size
|
||||
RUN find -exec sh -c 'file "{}" | grep -q ELF && strip --strip-debug "{}"' \; \
|
||||
# Disable executable stack in all libraries. This should already be the case
|
||||
|
Loading…
Reference in New Issue
Block a user