2
0
mirror of https://github.com/spritsail/plex-media-server.git synced 2024-12-20 11:34:36 +00:00

Merge remote-tracking branch 'origin/master' into nofonts

This commit is contained in:
Joe Groocock 2019-02-14 22:49:33 +00:00
commit 8f6e5461c2
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
2 changed files with 33 additions and 27 deletions

View File

@ -3,6 +3,7 @@ pipeline:
image: spritsail/docker-build image: spritsail/docker-build
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ] volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
repo: plex-nofonts-dev repo: plex-nofonts-dev
make: true
test-bin: test-bin:
image: spritsail/docker-test image: spritsail/docker-test

View File

@ -1,30 +1,39 @@
ARG PLEX_VER=1.14.1.5488-cc260c476 ARG PLEX_VER=1.15.0.659-9311f93fd
ARG PLEX_SHA=1bd274026c4d7038ec57bad7c3735ce47f73b887 ARG PLEX_SHA=514a6ecf45169ca43fc531ad5b2fbb869757bc09
ARG LIBSTDCPP_VER=6.3.0-18+deb9u1
ARG LIBGCC1_VER=6.3.0-18+deb9u1 ARG LIBGCC1_VER=6.3.0-18+deb9u1
ARG XMLSTAR_VER=1.6.1 ARG XMLSTAR_VER=1.6.1
ARG CURL_VER=curl-7_64_0 ARG CURL_VER=curl-7_64_0
ARG ZLIB_VER=1.2.11
FROM spritsail/debian-builder:stretch-slim as builder FROM spritsail/debian-builder:stretch-slim as builder
ARG PLEX_VER ARG PLEX_VER
ARG PLEX_SHA ARG PLEX_SHA
ARG LIBSTDCPP_VER
ARG LIBGCC1_VER ARG LIBGCC1_VER
ARG LIBXML2_VER=v2.9.8 ARG LIBXML2_VER=v2.9.8
ARG LIBXSLT_VER=v1.1.32 ARG LIBXSLT_VER=v1.1.32
ARG XMLSTAR_VER ARG XMLSTAR_VER
ARG LIBRE_VER=2.8.2 ARG LIBRE_VER=2.8.2
ARG CURL_VER ARG CURL_VER
ARG ZLIB_VER
RUN apt-get -y update \ ARG MAKEFLAGS=-j2
&& apt-get -y install zlib1g-dev
# Download and build zlib
WORKDIR /tmp/zlib
RUN curl -sSf https://www.zlib.net/zlib-$ZLIB_VER.tar.xz \
| tar xJ --strip-components=1 \
&& ./configure \
--prefix=/usr \
--shared \
&& make DESTDIR=/prefix install
# Download and build libxml2 # Download and build libxml2
WORKDIR /tmp/libxml2 WORKDIR /tmp/libxml2
RUN git clone https://gitlab.gnome.org/GNOME/libxml2.git --branch $LIBXML2_VER --depth 1 . \ RUN git clone https://gitlab.gnome.org/GNOME/libxml2.git --branch $LIBXML2_VER --depth 1 . \
&& ./autogen.sh \ && ./autogen.sh \
--prefix=/usr \ --prefix=/usr \
--with-zlib=/prefix/usr \
--without-catalog \ --without-catalog \
--without-docbook \ --without-docbook \
--without-ftp \ --without-ftp \
@ -34,20 +43,19 @@ RUN git clone https://gitlab.gnome.org/GNOME/libxml2.git --branch $LIBXML2_VER -
--without-legacy \ --without-legacy \
--without-modules \ --without-modules \
--without-python \ --without-python \
&& make -j$(nproc) \ && make DESTDIR=/prefix install
&& make -j$(nproc) DESTDIR=/prefix install
# Download and build libxslt # Download and build libxslt
WORKDIR /tmp/libxslt WORKDIR /tmp/libxslt
RUN git clone https://gitlab.gnome.org/GNOME/libxslt.git --branch $LIBXSLT_VER --depth 1 . \ RUN git clone https://gitlab.gnome.org/GNOME/libxslt.git --branch $LIBXSLT_VER --depth 1 . \
&& ./autogen.sh \ && ./autogen.sh \
--prefix=/usr \ --prefix=/usr \
--with-zlib=/prefix/usr \
--with-libxml-src="../libxml2" \ --with-libxml-src="../libxml2" \
--without-crypto \ --without-crypto \
--without-plugins \ --without-plugins \
--without-python \ --without-python \
&& make -j$(nproc) \ && make DESTDIR=/prefix install
&& make -j$(nproc) DESTDIR=/prefix install
# Download and build xmlstarlet # Download and build xmlstarlet
ADD xmlstarlet-*.patch /tmp ADD xmlstarlet-*.patch /tmp
@ -60,8 +68,7 @@ RUN git clone git://git.code.sf.net/p/xmlstar/code --branch $XMLSTAR_VER --depth
--disable-build-docs \ --disable-build-docs \
--with-libxml-prefix=/prefix/usr \ --with-libxml-prefix=/prefix/usr \
--with-libxslt-prefix=/prefix/usr \ --with-libxslt-prefix=/prefix/usr \
&& make -j$(nproc) \ && make DESTDIR=/prefix install
&& make -j$(nproc) DESTDIR=/prefix install
# Download and build LibreSSL as a cURL dependency # Download and build LibreSSL as a cURL dependency
WORKDIR /tmp/libressl WORKDIR /tmp/libressl
@ -69,7 +76,7 @@ RUN curl -sSL https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRE_VER}
| tar xz --strip-components=1 \ | tar xz --strip-components=1 \
# Install to the default system directories so cURL can find it # Install to the default system directories so cURL can find it
&& ./configure --prefix=/usr \ && ./configure --prefix=/usr \
&& make -j$(nproc) install && make install
# Download and build curl # Download and build curl
WORKDIR /tmp/curl WORKDIR /tmp/curl
@ -83,7 +90,7 @@ RUN git clone https://github.com/curl/curl.git --branch $CURL_VER --depth 1 . \
--enable-versioned-symbols \ --enable-versioned-symbols \
--enable-threaded-resolver \ --enable-threaded-resolver \
--with-ssl \ --with-ssl \
--with-zlib \ --with-zlib=/prefix/usr \
--disable-crypto-auth \ --disable-crypto-auth \
--disable-curldebug \ --disable-curldebug \
--disable-dependency-tracking \ --disable-dependency-tracking \
@ -109,15 +116,13 @@ RUN git clone https://github.com/curl/curl.git --branch $CURL_VER --depth 1 . \
--without-libpsl \ --without-libpsl \
--without-librtmp \ --without-librtmp \
--without-winidn \ --without-winidn \
&& make -j$(nproc) \ && make DESTDIR=/prefix install
&& make -j$(nproc) DESTDIR=/prefix install
WORKDIR /prefix WORKDIR /prefix
# Fetch Plex and required libraries # Fetch Plex and required libraries
RUN curl -fsSL http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBSTDCPP_VER:0:1}/libstdc++6_${LIBSTDCPP_VER}_amd64.deb | dpkg-deb -x - . \ RUN curl -fsSL http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBGCC1_VER:0:1}/libgcc1_${LIBGCC1_VER}_amd64.deb | dpkg-deb -x - . \
&& curl -fsSL http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBGCC1_VER:0:1}/libgcc1_${LIBGCC1_VER}_amd64.deb | dpkg-deb -x - . \ && curl -fsSL -o plexmediaserver.deb https://downloads.plex.tv/plex-media-server-new/${PLEX_VER}/debian/plexmediaserver_${PLEX_VER}_amd64.deb \
&& curl -fsSL -o plexmediaserver.deb https://downloads.plex.tv/plex-media-server/${PLEX_VER}/plexmediaserver_${PLEX_VER}_amd64.deb \
\ \
&& echo "$PLEX_SHA plexmediaserver.deb" | sha1sum -c - \ && echo "$PLEX_SHA plexmediaserver.deb" | sha1sum -c - \
&& dpkg-deb -x plexmediaserver.deb . \ && dpkg-deb -x plexmediaserver.deb . \
@ -126,25 +131,25 @@ RUN curl -fsSL http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBSTDCPP_VER:0
&& rm -f \ && rm -f \
"Plex Media Server Tests" \ "Plex Media Server Tests" \
MigratePlexServerConfig.sh \ MigratePlexServerConfig.sh \
libcrypto.so.1.0.0 \ lib/libcrypto.so* \
libcurl.so.4 \ lib/libcurl.so* \
libssl.so.1.0.0 \ lib/libssl.so* \
libxml2.so.2 \ lib/libxml2.so* \
libxslt.so.1 \ lib/libxslt.so* \
lib/libz.so* \
# I have no idea if these fonts are required however they take up ~35MB of space and ideally we could do without them. # I have no idea if these fonts are required however they take up ~35MB of space and ideally we could do without them.
Resources/Fonts/NotoNaskh* \ Resources/Fonts/NotoNaskh* \
Resources/Fonts/NotoSans* \ Resources/Fonts/NotoSans* \
Resources/Fonts/OpenSans* \ Resources/Fonts/OpenSans* \
Resources/start.sh \ Resources/start.sh \
# Place shared libraries in usr/lib so they can be actually shared # Place shared libraries in usr/lib so they can be actually shared
&& mv *.so* ../ && mv lib/* ../
# Strip all unneeded symbols for optimum size # Strip all unneeded symbols for optimum size
RUN find -exec sh -c 'file "{}" | grep -q ELF && strip --strip-debug "{}"' \; \ RUN find -exec sh -c 'file "{}" | grep -q ELF && strip --strip-debug "{}"' \; \
\ \
&& mkdir -p /output/usr/lib /output/usr/bin \ && mkdir -p /output/usr/lib /output/usr/bin \
&& mv usr/lib/x86_64-linux-gnu/*.so* \ && mv lib/x86_64-linux-gnu/*.so* \
lib/x86_64-linux-gnu/*.so* \
usr/lib/plexmediaserver \ usr/lib/plexmediaserver \
usr/lib/*.so* \ usr/lib/*.so* \
/output/usr/lib \ /output/usr/lib \