Merge upgrades from master into pass branch

commit 8a4ed82279
Author: Adam Dodman <adam@adam-ant.co.uk>
Date:   Sun Jul 8 15:04:02 2018 +0100

    Move to mutli-stage build

commit 916ae6f3b7
Author: Adam Dodman <adam@adam-ant.co.uk>
Date:   Sun Jul 8 14:30:52 2018 +0100

    Move to commit to upgrade system

commit 316c9be5f4
Author: Adam Dodman <adam@adam-ant.co.uk>
Date:   Sun Jul 8 14:29:12 2018 +0100

    Use libressl base image

commit 13ef35e687
Author: Adam Dodman <adam@adam-ant.co.uk>
Date:   Mon Jun 11 17:10:36 2018 +0100

    Move to new notify step
This commit is contained in:
Adam Dodman 2018-07-08 16:57:17 +01:00
parent 204dfa953a
commit 73b6f06e37
Signed by: AdamAnt
GPG Key ID: 7826B108895B86AA
2 changed files with 55 additions and 48 deletions

View File

@ -1,30 +1,21 @@
pipeline: pipeline:
identify:
image: docker
commands:
# Grab the current version, prevents race conditions
- apk add --no-cache openssl jq
- wget -qO- https://spritsail.io/plex/release.php?pass | tee .plex_release
- jq -r '.["url-deb"]' .plex_release > .plex_url
- jq -r '.["version"]' .plex_release > .plex_version
- jq -r '.["csum-deb"]' .plex_release > .plex_checksum
- jq -r '.["version"]' .plex_release | cut -d- -f1 > .plex_tag
build: build:
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: ppass-dev repo: ppass-dev
build_args:
- 'PLEX_URL=%file: .plex_url' tag:
- 'PLEX_VER=%file: .plex_version' image: docker
- 'PLEX_SHA=%file: .plex_checksum' volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
commands:
- docker inspect -f '{{ index .Config.Labels "io.spritsail.version.plex" }}' ppass-dev | cut -d- -f1 > .plex_tag
test: test:
image: docker image: docker
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ] volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
commands: commands:
- apk add --no-cache curl xmlstarlet grep - apk add --no-cache curl xmlstarlet grep
- export CUR_VERSION="$(cat .plex_version)" - export CUR_VERSION="$(cat .plex_tag)"
- CON_NAME=$(docker run --rm -d ppass-dev) - CON_NAME=$(docker run --rm -d ppass-dev)
- timeout -t 15 docker logs $$CON_NAME & - timeout -t 15 docker logs $$CON_NAME &
- sleep 10 # Wait for plex to start! - sleep 10 # Wait for plex to start!

View File

@ -1,49 +1,65 @@
FROM spritsail/busybox:libressl ARG PLEX_VER=1.13.3.5223-cd1e0da1b
ARG PLEX_SHA=21524a2e329a9610ce647278b99c0e0177e87d5b
ARG PLEX_VER=latest
ARG PLEX_URL
ARG PLEX_SHA
ARG LIBSTDCPP_VER=6.3.0-18+deb9u1 ARG LIBSTDCPP_VER=6.3.0-18+deb9u1
ARG LIBGCC1_VER=6.3.0-18+deb9u1 ARG LIBGCC1_VER=6.3.0-18+deb9u1
FROM spritsail/debian-builder:stretch-slim as builder
ARG PLEX_VER
ARG PLEX_SHA
ARG LIBSTDCPP_VER
ARG LIBGCC1_VER
WORKDIR /tmp
RUN mkdir -p /output/usr/lib /output/{lib, sbin}
RUN curl -fsSL -o libstdcpp.deb http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBSTDCPP_VER:0:1}/libstdc++6_${LIBSTDCPP_VER}_amd64.deb \
&& curl -fsSL -o libgcc1.deb http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBGCC1_VER:0:1}/libgcc1_${LIBGCC1_VER}_amd64.deb \
&& dpkg-deb -x libstdcpp.deb . \
&& dpkg-deb -x libgcc1.deb . \
# We only need the lib files, everything else is debian junk.
&& mv $PWD/usr/lib/x86_64-linux-gnu/* /output/usr/lib \
# Maybe /lib
&& mv $PWD/lib/x86_64-linux-gnu/* /output/usr/lib
RUN 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 - \
&& dpkg-deb -x plexmediaserver.deb . \
&& mv usr/lib/plexmediaserver /output/usr/lib
ADD start_pms /output/usr/sbin/start_pms
RUN chmod +x /output/usr/sbin/start_pms
#=========================
FROM spritsail/libressl
ARG PLEX_VER
ARG LIBSTDCPP_VER
ARG LIBGCC1_VER
LABEL maintainer="Spritsail <plex@spritsail.io>" \ LABEL maintainer="Spritsail <plex@spritsail.io>" \
org.label-schema.vendor="Spritsail" \ org.label-schema.vendor="Spritsail" \
org.label-schema.name="Plex Media Server" \ org.label-schema.name="Plex Media Server" \
org.label-schema.url="https://www.plex.tv/downloads/" \ org.label-schema.url="https://www.plex.tv/downloads/" \
org.label-schema.description="Tiny Docker image for Plex Media Server, built on spritsail/busybox" \ org.label-schema.description="Tiny Docker image for Plex Media Server, built on busybox" \
org.label-schema.version=$PLEX_VER org.label-schema.version=${PLEX_VER} \
io.spritsail.version.plex=${PLEX_VER} \
io.spritsail.version.libstdcpp=${LIBSTDCPP_VER} \
io.spritsail.version.libgcc1=${LIBGCC1_VER}
ENV SUID=900 SGID=900 ENV SUID=900 SGID=900
ADD start_pms /usr/sbin/start_pms
WORKDIR /tmp COPY --from=builder /output/ /
RUN chmod +x /usr/sbin/start_pms \
&& wget http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBSTDCPP_VER:0:1}/libstdc++6_${LIBSTDCPP_VER}_amd64.deb \
&& wget http://ftp.de.debian.org/debian/pool/main/g/gcc-${LIBGCC1_VER:0:1}/libgcc1_${LIBGCC1_VER}_amd64.deb \
&& dpkg-deb -x libstdc++6*.deb . \
&& dpkg-deb -x libgcc1*.deb . \
# We only need the lib files, everything else is debian junk.
&& mv $PWD/usr/lib/x86_64-linux-gnu/* /lib \
&& mv $PWD/lib/x86_64-linux-gnu/* /lib \
\
&& if [ "$PLEX_VER" == "latest" -o -z "$PLEX_URL" ]; then \
export PLEX_VER="$(wget -qO- https://spritsail.io/plex/release.php?pass&raw=version)"; \
export PLEX_URL="$(wget -qO- https://spritsail.io/plex/release.php?pass&raw=url-deb)"; \
export PLEX_SHA="$(wget -qO- https://spritsail.io/plex/release.php?pass&raw=csum-deb)"; \
fi \
&& echo "$PLEX_SHA plexmediaserver.deb" > sumfile \
&& wget -O plexmediaserver.deb "$PLEX_URL" \
&& sha1sum -c sumfile \
\
&& dpkg-deb -x plexmediaserver.deb . \
&& mv usr/lib/plexmediaserver /usr/lib \
&& find $PWD -mindepth 1 -delete
HEALTHCHECK --interval=10s --timeout=5s \ HEALTHCHECK --interval=10s --timeout=5s \
CMD [ "wget", "-O", "/dev/null", "-T", "10", "-q", "localhost:32400/identity" ] CMD [ "wget", "-O", "/dev/null", "-T", "10", "-q", "localhost:32400/identity" ]
WORKDIR /usr/lib/plexmediaserver WORKDIR /usr/lib/plexmediaserver
EXPOSE 32400
ENTRYPOINT ["/sbin/tini", "--"] ENTRYPOINT ["/sbin/tini", "--"]
CMD ["start_pms"] CMD ["/usr/sbin/start_pms"]