2
0
mirror of https://github.com/spritsail/plex-media-server.git synced 2025-06-10 13:11:12 +00:00

Pass plex version into container as build-arg

This commit is contained in:
2017-09-20 00:03:03 +01:00
parent 0e6cb00bde
commit 533a6da6f4
2 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,8 @@ ADD start_pms /usr/sbin/start_pms
WORKDIR /tmp
ARG PLEX_VER
RUN wget http://ftp.de.debian.org/debian/pool/main/g/gcc-6/libstdc++6_6.3.0-18_amd64.deb \
&& wget http://ftp.de.debian.org/debian/pool/main/g/gcc-6/libgcc1_6.3.0-18_amd64.deb \
&& dpkg-deb -x libstdc++6*.deb . \
@ -13,7 +15,9 @@ RUN wget http://ftp.de.debian.org/debian/pool/main/g/gcc-6/libstdc++6_6.3.0-18_a
# We only need the lib files, everything else is debian junk.
&& mv /tmp/usr/lib/x86_64-linux-gnu/* /lib \
&& mv /tmp/lib/x86_64-linux-gnu/* /lib \
&& export PLEX_VER=$(wget -qO- https://adam-ant.co.uk/plex/version.php | sed -n 's/.*"release":\s*"\([^"]*\)".*/\1/p') \
&& if [ -z "$PLEX_VER" ]; then \
export PLEX_VER=$(wget -qO- https://adam-ant.co.uk/plex/version.php | sed -n 's/.*"release":\s*"\([^"]*\)".*/\1/p'); \
fi \
&& wget -O plexmediaserver.deb "https://downloads.plex.tv/plex-media-server/$PLEX_VER/plexmediaserver_"$PLEX_VER"_amd64.deb" \
&& dpkg-deb -x plexmediaserver.deb . \
# Move usr/lib/plexmediaserver. Everything else is useless