mirror of
https://github.com/spritsail/plex-media-server.git
synced 2024-11-08 18:56:22 +00:00
Merge remote-tracking branch 'origin/master' into pass
This commit is contained in:
commit
76b32fd50f
79
.drone.yml
79
.drone.yml
@ -1,41 +1,76 @@
|
|||||||
pipeline:
|
---
|
||||||
build:
|
kind: pipeline
|
||||||
image: spritsail/docker-build
|
name: build-amd64
|
||||||
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
|
|
||||||
repo: ppass-dev
|
|
||||||
make: true
|
|
||||||
|
|
||||||
test-bin:
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
pull: always
|
||||||
|
image: spritsail/docker-build
|
||||||
|
settings:
|
||||||
|
make: true
|
||||||
|
repo: ppass-dev
|
||||||
|
|
||||||
|
- name: test-bin
|
||||||
|
pull: always
|
||||||
image: spritsail/docker-test
|
image: spritsail/docker-test
|
||||||
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
|
settings:
|
||||||
repo: ppass-dev
|
repo: ppass-dev
|
||||||
run: |
|
run: |
|
||||||
curl --version &&
|
curl --version &&
|
||||||
xmlstarlet --version
|
xmlstarlet --version
|
||||||
|
|
||||||
test:
|
- name: test
|
||||||
|
pull: always
|
||||||
image: spritsail/docker-test
|
image: spritsail/docker-test
|
||||||
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
|
settings:
|
||||||
repo: ppass-dev
|
curl: :32400/identity
|
||||||
curl: ':32400/identity'
|
|
||||||
delay: 5
|
delay: 5
|
||||||
retry: 10
|
|
||||||
pipe: |
|
pipe: |
|
||||||
xmlstarlet sel -t -v "/MediaContainer/@version" |
|
xmlstarlet sel -t -v "/MediaContainer/@version" |
|
||||||
grep -qw "$(label io.spritsail.version.plex | cut -d- -f1)"
|
grep -qw "$(label io.spritsail.version.plex | cut -d- -f1)"
|
||||||
|
repo: ppass-dev
|
||||||
|
retry: 10
|
||||||
|
|
||||||
publish:
|
- name: publish
|
||||||
|
pull: always
|
||||||
image: spritsail/docker-publish
|
image: spritsail/docker-publish
|
||||||
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
|
settings:
|
||||||
secrets: [ docker_username, docker_password, microbadger_token ]
|
|
||||||
when: { branch: [ pass ], event: [ push, tag, deployment ] }
|
|
||||||
from: ppass-dev
|
from: ppass-dev
|
||||||
repo: spritsail/plex-media-server
|
repo: spritsail/plex-media-server
|
||||||
tags:
|
tags:
|
||||||
- 'plexpass'
|
- plexpass
|
||||||
- '%label io.spritsail.version.plex | %prefix plexpass | %remsuf [0-9a-f]+$ | %auto 2'
|
- "%label io.spritsail.version.plex | %prefix plexpass | %remsuf [0-9a-f]+$ | %auto 2"
|
||||||
|
environment:
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- pass
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- tag
|
||||||
|
|
||||||
notify:
|
- name: notify
|
||||||
|
pull: always
|
||||||
image: spritsail/notify
|
image: spritsail/notify
|
||||||
when: { status: [ success, failure ] }
|
environment:
|
||||||
secrets: [ webhook_url, notify_token ]
|
NOTIFY_TOKEN:
|
||||||
|
from_secret: notify_token
|
||||||
|
WEBHOOK_URL:
|
||||||
|
from_secret: webhook_url
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: signature
|
||||||
|
hmac: 9ccac4af6a5a1f3849f3593741c44df1564956093fc038f628fa500973969b43
|
||||||
|
|
||||||
|
...
|
||||||
|
96
Dockerfile
96
Dockerfile
@ -1,6 +1,5 @@
|
|||||||
ARG PLEX_VER=1.16.5.1488-deeb86e7f
|
ARG PLEX_VER=1.16.5.1488-deeb86e7f
|
||||||
ARG PLEX_SHA=e46c4db05ef9402447246e92e3f5ed808eb11389
|
ARG PLEX_SHA=e46c4db05ef9402447246e92e3f5ed808eb11389
|
||||||
ARG LIBGCC1_VER=8.3.0-6
|
|
||||||
ARG XMLSTAR_VER=1.6.1
|
ARG XMLSTAR_VER=1.6.1
|
||||||
ARG CURL_VER=curl-7_65_1
|
ARG CURL_VER=curl-7_65_1
|
||||||
ARG ZLIB_VER=1.2.11
|
ARG ZLIB_VER=1.2.11
|
||||||
@ -10,14 +9,40 @@ FROM spritsail/debian-builder:buster-slim as builder
|
|||||||
|
|
||||||
ARG PLEX_VER
|
ARG PLEX_VER
|
||||||
ARG PLEX_SHA
|
ARG PLEX_SHA
|
||||||
ARG LIBGCC1_VER
|
ARG LIBXML2_VER=v2.9.9
|
||||||
ARG LIBXML2_VER=v2.9.8
|
ARG LIBXSLT_VER=v1.1.33
|
||||||
ARG LIBXSLT_VER=v1.1.32
|
|
||||||
ARG XMLSTAR_VER
|
ARG XMLSTAR_VER
|
||||||
ARG LIBRE_VER
|
ARG LIBRE_VER
|
||||||
ARG CURL_VER
|
ARG CURL_VER
|
||||||
ARG ZLIB_VER
|
ARG ZLIB_VER
|
||||||
|
|
||||||
|
ARG PREFIX=/prefix
|
||||||
|
|
||||||
|
WORKDIR /plex
|
||||||
|
|
||||||
|
# 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 . \
|
||||||
|
\
|
||||||
|
&& rm -r \
|
||||||
|
etc/ lib/ usr/sbin/ usr/share/ \
|
||||||
|
plexmediaserver.deb \
|
||||||
|
\
|
||||||
|
&& cd usr/lib/plexmediaserver \
|
||||||
|
&& rm \
|
||||||
|
lib/libcrypto.so* \
|
||||||
|
lib/libcurl.so* \
|
||||||
|
lib/libssl.so* \
|
||||||
|
lib/libxml2.so* \
|
||||||
|
lib/libxslt.so* \
|
||||||
|
lib/libexslt.so* \
|
||||||
|
Resources/start.sh \
|
||||||
|
# Place shared libraries in usr/lib so they can be actually shared
|
||||||
|
&& mv lib/*.so* lib/dri ../ \
|
||||||
|
&& rmdir lib \
|
||||||
|
&& cp /lib/x86_64-linux-gnu/libgcc_s.so.1 ../
|
||||||
|
|
||||||
# Download and build zlib
|
# Download and build zlib
|
||||||
WORKDIR /tmp/zlib
|
WORKDIR /tmp/zlib
|
||||||
RUN curl -sSf https://www.zlib.net/zlib-$ZLIB_VER.tar.xz \
|
RUN curl -sSf https://www.zlib.net/zlib-$ZLIB_VER.tar.xz \
|
||||||
@ -25,14 +50,14 @@ RUN curl -sSf https://www.zlib.net/zlib-$ZLIB_VER.tar.xz \
|
|||||||
&& ./configure \
|
&& ./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--shared \
|
--shared \
|
||||||
&& make DESTDIR=/prefix install
|
&& 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 \
|
--with-zlib=$PREFIX/usr \
|
||||||
--without-catalog \
|
--without-catalog \
|
||||||
--without-docbook \
|
--without-docbook \
|
||||||
--without-ftp \
|
--without-ftp \
|
||||||
@ -42,19 +67,18 @@ 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 DESTDIR=/prefix install
|
&& make 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 DESTDIR=/prefix install
|
&& make DESTDIR=$PREFIX install
|
||||||
|
|
||||||
# Download and build xmlstarlet
|
# Download and build xmlstarlet
|
||||||
ADD xmlstarlet-*.patch /tmp
|
ADD xmlstarlet-*.patch /tmp
|
||||||
@ -65,9 +89,9 @@ RUN git clone git://git.code.sf.net/p/xmlstar/code --branch $XMLSTAR_VER --depth
|
|||||||
&& ./configure \
|
&& ./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--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 DESTDIR=/prefix install
|
&& make 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
|
||||||
@ -89,7 +113,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=/prefix/usr \
|
--with-zlib=$PREFIX/usr \
|
||||||
--disable-crypto-auth \
|
--disable-crypto-auth \
|
||||||
--disable-curldebug \
|
--disable-curldebug \
|
||||||
--disable-dependency-tracking \
|
--disable-dependency-tracking \
|
||||||
@ -115,46 +139,24 @@ 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 DESTDIR=/prefix install
|
&& make DESTDIR=$PREFIX install
|
||||||
|
|
||||||
WORKDIR /prefix
|
WORKDIR $PREFIX
|
||||||
|
|
||||||
# Fetch Plex and required libraries
|
RUN mkdir -p /output/usr/lib /output/usr/bin \
|
||||||
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 - . \
|
&& mv usr/lib/*.so* \
|
||||||
&& curl -fsSL -o plexmediaserver.deb https://downloads.plex.tv/plex-media-server-new/${PLEX_VER}/debian/plexmediaserver_${PLEX_VER}_amd64.deb \
|
/plex/usr/lib/* \
|
||||||
\
|
/output/usr/lib \
|
||||||
&& echo "$PLEX_SHA plexmediaserver.deb" | sha1sum -c - \
|
&& mv usr/bin/curl /output/usr/bin \
|
||||||
&& dpkg-deb -x plexmediaserver.deb . \
|
&& mv usr/bin/xml /output/usr/bin/xmlstarlet
|
||||||
\
|
|
||||||
&& 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/* ../
|
|
||||||
|
|
||||||
# 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 /output -exec sh -c 'file "{}" | grep -q ELF && strip --strip-debug "{}"' \; \
|
||||||
# Disable executable stack in all libraries. This should already be the case
|
# Disable executable stack in all libraries. This should already be the case
|
||||||
# but it seems libgnsdk is not playing along
|
# but it seems libgnsdk is not playing along
|
||||||
&& apt-get -y update \
|
&& apt-get -y update \
|
||||||
&& apt-get -y install execstack \
|
&& apt-get -y install execstack \
|
||||||
&& execstack -c usr/lib/*.so* \
|
&& execstack -c /output/usr/lib/*.so*
|
||||||
\
|
|
||||||
&& mkdir -p /output/usr/lib /output/usr/bin \
|
|
||||||
&& mv lib/x86_64-linux-gnu/*.so* \
|
|
||||||
usr/lib/plexmediaserver \
|
|
||||||
usr/lib/*.so* \
|
|
||||||
/output/usr/lib \
|
|
||||||
&& mv usr/bin/curl /output/usr/bin \
|
|
||||||
&& mv usr/bin/xml /output/usr/bin/xmlstarlet
|
|
||||||
|
|
||||||
ADD entrypoint /output/usr/local/bin/
|
ADD entrypoint /output/usr/local/bin/
|
||||||
ADD *.sh /output/usr/local/bin/
|
ADD *.sh /output/usr/local/bin/
|
||||||
@ -165,8 +167,6 @@ RUN chmod +x /output/usr/local/bin/*
|
|||||||
FROM spritsail/libressl:$LIBRE_VER
|
FROM spritsail/libressl:$LIBRE_VER
|
||||||
|
|
||||||
ARG PLEX_VER
|
ARG PLEX_VER
|
||||||
ARG LIBSTDCPP_VER
|
|
||||||
ARG LIBGCC1_VER
|
|
||||||
ARG CURL_VER
|
ARG CURL_VER
|
||||||
ARG XMLSTAR_VER
|
ARG XMLSTAR_VER
|
||||||
|
|
||||||
@ -178,8 +178,6 @@ LABEL maintainer="Spritsail <plex@spritsail.io>" \
|
|||||||
org.label-schema.version=${PLEX_VER} \
|
org.label-schema.version=${PLEX_VER} \
|
||||||
io.spritsail.version.plex=${PLEX_VER} \
|
io.spritsail.version.plex=${PLEX_VER} \
|
||||||
io.spritsail.version.curl=${CURL_VER} \
|
io.spritsail.version.curl=${CURL_VER} \
|
||||||
io.spritsail.version.libgcc1=${LIBGCC1_VER} \
|
|
||||||
io.spritsail.version.libstdcpp=${LIBSTDCPP_VER} \
|
|
||||||
io.spritsail.version.xmlstarlet=${XMLSTAR_VER}
|
io.spritsail.version.xmlstarlet=${XMLSTAR_VER}
|
||||||
|
|
||||||
WORKDIR /usr/lib/plexmediaserver
|
WORKDIR /usr/lib/plexmediaserver
|
||||||
|
Loading…
Reference in New Issue
Block a user