Migrate to s6v3

This commit is contained in:
TheSpad
2022-09-17 17:21:54 +01:00
parent 658a47cbee
commit 5530299be2
24 changed files with 159 additions and 150 deletions

View File

@@ -1,39 +1,39 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:bionic as buildstage FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy as buildstage
# build args # build args
ARG EMBY_RELEASE ARG EMBY_RELEASE
ENV DEBIAN_FRONTEND="noninteractive" ENV DEBIAN_FRONTEND="noninteractive"
RUN \ RUN \
echo "**** install packages ****" && \ echo "**** install packages ****" && \
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
cpio \ cpio \
jq \ jq \
rpm2cpio && \ rpm2cpio && \
echo "**** install emby ****" && \ echo "**** install emby ****" && \
mkdir -p \ mkdir -p \
/app/emby && \ /app/emby && \
if [ -z ${EMBY_RELEASE+x} ]; then \ if [ -z ${EMBY_RELEASE+x} ]; then \
EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \
| jq -r '. | .tag_name'); \ | jq -r '. | .tag_name'); \
fi && \ fi && \
curl -o \ curl -o \
/tmp/emby.rpm -L \ /tmp/emby.rpm -L \
"https://github.com/MediaBrowser/Emby.Releases/releases/download/${EMBY_RELEASE}/emby-server-rpm_${EMBY_RELEASE}_x86_64.rpm" && \ "https://github.com/MediaBrowser/Emby.Releases/releases/download/${EMBY_RELEASE}/emby-server-rpm_${EMBY_RELEASE}_x86_64.rpm" && \
cd /tmp && \ cd /tmp && \
rpm2cpio emby.rpm \ rpm2cpio emby.rpm \
| cpio -i --make-directories && \ | cpio -i --make-directories && \
mv -t \ mv -t \
/app/emby/ \ /app/emby/ \
/tmp/opt/emby-server/system/* \ /tmp/opt/emby-server/system/* \
/tmp/opt/emby-server/lib/* \ /tmp/opt/emby-server/lib/* \
/tmp/opt/emby-server/bin/ff* \ /tmp/opt/emby-server/bin/ff* \
/tmp/opt/emby-server/etc \ /tmp/opt/emby-server/etc \
/tmp/opt/emby-server/extra/lib/* /tmp/opt/emby-server/extra/lib/*
# runtime stage # runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@@ -41,20 +41,22 @@ ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer" LABEL maintainer="thelamer"
ARG DEBIAN_FRONTEND="noninteractive"
# add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker # add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
# install packages # install packages
RUN \ RUN \
echo "**** install packages ****" && \ echo "**** install packages ****" && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
mesa-va-drivers && \ mesa-va-drivers && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/var/lib/apt/lists/* \ /var/lib/apt/lists/* \
/var/tmp/* /var/tmp/*
# add local files # add local files
COPY --from=buildstage /app/emby /app/emby COPY --from=buildstage /app/emby /app/emby

View File

@@ -1,39 +1,39 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-bionic as buildstage FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy as buildstage
# build args # build args
ARG EMBY_RELEASE ARG EMBY_RELEASE
ENV DEBIAN_FRONTEND="noninteractive" ENV DEBIAN_FRONTEND="noninteractive"
RUN \ RUN \
echo "**** install packages ****" && \ echo "**** install packages ****" && \
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
cpio \ cpio \
jq \ jq \
rpm2cpio && \ rpm2cpio && \
echo "**** install emby ****" && \ echo "**** install emby ****" && \
mkdir -p \ mkdir -p \
/app/emby && \ /app/emby && \
if [ -z ${EMBY_RELEASE+x} ]; then \ if [ -z ${EMBY_RELEASE+x} ]; then \
EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \
| jq -r '. | .tag_name'); \ | jq -r '. | .tag_name'); \
fi && \ fi && \
curl -o \ curl -o \
/tmp/emby.rpm -L \ /tmp/emby.rpm -L \
"https://github.com/MediaBrowser/Emby.Releases/releases/download/${EMBY_RELEASE}/emby-server-rpm_${EMBY_RELEASE}_aarch64.rpm" && \ "https://github.com/MediaBrowser/Emby.Releases/releases/download/${EMBY_RELEASE}/emby-server-rpm_${EMBY_RELEASE}_aarch64.rpm" && \
cd /tmp && \ cd /tmp && \
rpm2cpio emby.rpm \ rpm2cpio emby.rpm \
| cpio -i --make-directories && \ | cpio -i --make-directories && \
mv -t \ mv -t \
/app/emby/ \ /app/emby/ \
/tmp/opt/emby-server/system/* \ /tmp/opt/emby-server/system/* \
/tmp/opt/emby-server/lib/* \ /tmp/opt/emby-server/lib/* \
/tmp/opt/emby-server/bin/ff* \ /tmp/opt/emby-server/bin/ff* \
/tmp/opt/emby-server/etc \ /tmp/opt/emby-server/etc \
/tmp/opt/emby-server/extra/lib/* /tmp/opt/emby-server/extra/lib/*
# runtime stage # runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@@ -41,23 +41,25 @@ ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer" LABEL maintainer="thelamer"
ARG DEBIAN_FRONTEND="noninteractive"
# add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker # add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
RUN \ RUN \
echo "**** add emby deps *****" && \ echo "**** add emby deps *****" && \
curl -s https://keyserver.ubuntu.com/pks/lookup?op=get\&search=0x6587ffd6536b8826e88a62547876ae518cbcf2f2 | apt-key add - && \ curl -s https://keyserver.ubuntu.com/pks/lookup?op=get\&search=0x6587ffd6536b8826e88a62547876ae518cbcf2f2 | apt-key add - && \
echo "deb http://ppa.launchpad.net/ubuntu-raspi2/ppa-nightly/ubuntu focal main">> /etc/apt/sources.list.d/raspbins.list && \ echo "deb http://ppa.launchpad.net/ubuntu-raspi2/ppa-nightly/ubuntu focal main">> /etc/apt/sources.list.d/raspbins.list && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
libomxil-bellagio0 \ libomxil-bellagio0 \
libomxil-bellagio-bin \ libomxil-bellagio-bin \
libraspberrypi0 && \ libraspberrypi0 && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/var/lib/apt/lists/* \ /var/lib/apt/lists/* \
/var/tmp/* /var/tmp/*
# add local files # add local files
COPY --from=buildstage /app/emby /app/emby COPY --from=buildstage /app/emby /app/emby

View File

@@ -1,39 +1,39 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-bionic as buildstage FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy as buildstage
# build args # build args
ARG EMBY_RELEASE ARG EMBY_RELEASE
ENV DEBIAN_FRONTEND="noninteractive" ENV DEBIAN_FRONTEND="noninteractive"
RUN \ RUN \
echo "**** install packages ****" && \ echo "**** install packages ****" && \
apt-get update && \ apt-get update && \
apt-get install -y \ apt-get install -y \
cpio \ cpio \
jq \ jq \
rpm2cpio && \ rpm2cpio && \
echo "**** install emby ****" && \ echo "**** install emby ****" && \
mkdir -p \ mkdir -p \
/app/emby && \ /app/emby && \
if [ -z ${EMBY_RELEASE+x} ]; then \ if [ -z ${EMBY_RELEASE+x} ]; then \
EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \ EMBY_RELEASE=$(curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest \
| jq -r '. | .tag_name'); \ | jq -r '. | .tag_name'); \
fi && \ fi && \
curl -o \ curl -o \
/tmp/emby.rpm -L \ /tmp/emby.rpm -L \
"https://github.com/MediaBrowser/Emby.Releases/releases/download/${EMBY_RELEASE}/emby-server-rpm_${EMBY_RELEASE}_armv7hl.rpm" && \ "https://github.com/MediaBrowser/Emby.Releases/releases/download/${EMBY_RELEASE}/emby-server-rpm_${EMBY_RELEASE}_armv7hl.rpm" && \
cd /tmp && \ cd /tmp && \
rpm2cpio emby.rpm \ rpm2cpio emby.rpm \
| cpio -i --make-directories && \ | cpio -i --make-directories && \
mv -t \ mv -t \
/app/emby/ \ /app/emby/ \
/tmp/opt/emby-server/system/* \ /tmp/opt/emby-server/system/* \
/tmp/opt/emby-server/lib/* \ /tmp/opt/emby-server/lib/* \
/tmp/opt/emby-server/bin/ff* \ /tmp/opt/emby-server/bin/ff* \
/tmp/opt/emby-server/etc \ /tmp/opt/emby-server/etc \
/tmp/opt/emby-server/extra/lib/* /tmp/opt/emby-server/extra/lib/*
# runtime stage # runtime stage
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@@ -41,23 +41,25 @@ ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer" LABEL maintainer="thelamer"
ARG DEBIAN_FRONTEND="noninteractive"
# add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker # add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
RUN \ RUN \
echo "**** add emby deps *****" && \ echo "**** add emby deps *****" && \
curl -s https://keyserver.ubuntu.com/pks/lookup?op=get\&search=0x6587ffd6536b8826e88a62547876ae518cbcf2f2 | apt-key add - && \ curl -s https://keyserver.ubuntu.com/pks/lookup?op=get\&search=0x6587ffd6536b8826e88a62547876ae518cbcf2f2 | apt-key add - && \
echo "deb http://ppa.launchpad.net/ubuntu-raspi2/ppa-nightly/ubuntu focal main">> /etc/apt/sources.list.d/raspbins.list && \ echo "deb http://ppa.launchpad.net/ubuntu-raspi2/ppa-nightly/ubuntu focal main">> /etc/apt/sources.list.d/raspbins.list && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
libomxil-bellagio0 \ libomxil-bellagio0 \
libomxil-bellagio-bin \ libomxil-bellagio-bin \
libraspberrypi0 && \ libraspberrypi0 && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/* \
/var/lib/apt/lists/* \ /var/lib/apt/lists/* \
/var/tmp/* /var/tmp/*
# add local files # add local files
COPY --from=buildstage /app/emby /app/emby COPY --from=buildstage /app/emby /app/emby

2
Jenkinsfile vendored
View File

@@ -720,7 +720,7 @@ pipeline {
-e DO_REGION="ams3" \ -e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \ -e DO_BUCKET="lsio-ci" \
-t ghcr.io/linuxserver/ci:latest \ -t ghcr.io/linuxserver/ci:latest \
python /ci/ci.py''' python3 test_build.py'''
} }
} }
} }

View File

@@ -289,6 +289,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **18.09.22:** - Migrate to s6v3.
* **19.05.21:** - Structural changes upstream. * **19.05.21:** - Structural changes upstream.
* **17.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information. Remove no longer used mapping for /transcode. * **17.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information. Remove no longer used mapping for /transcode.
* **21.12.20:** - Rebase to Focal, see [here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal) for troubleshooting armhf. * **21.12.20:** - Rebase to Focal, see [here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal) for troubleshooting armhf.

View File

@@ -90,6 +90,7 @@ app_setup_block: |
# changelog # changelog
changelogs: changelogs:
- { date: "18.09.22:", desc: "Migrate to s6v3." }
- { date: "19.05.21:", desc: "Structural changes upstream." } - { date: "19.05.21:", desc: "Structural changes upstream." }
- { date: "17.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information. Remove no longer used mapping for /transcode." } - { date: "17.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information. Remove no longer used mapping for /transcode." }
- { date: "21.12.20:", desc: "Rebase to Focal, see [here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal) for troubleshooting armhf." } - { date: "21.12.20:", desc: "Rebase to Focal, see [here](https://docs.linuxserver.io/faq#my-host-is-incompatible-with-images-based-on-ubuntu-focal) for troubleshooting armhf." }

View File

@@ -2,15 +2,16 @@
# Create folders # Create folders
mkdir -p \ mkdir -p \
/data \ /data \
/transcode /transcode
# permissions (non-recursive) on config root and folders # permissions (non-recursive) on config root and folders
chown abc:abc \ chown abc:abc \
/config \ /config \
/data \ /data \
/transcode /transcode
if [ -n "$(ls -A /data 2>/dev/null)" ]; then if [ -n "$(ls -A /data 2>/dev/null)" ]; then
chown abc:abc \ chown abc:abc \
/data/* /data/*
fi fi

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-emby/run

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-video/run

View File

@@ -0,0 +1 @@
3

View File

@@ -0,0 +1,18 @@
#!/usr/bin/with-contenv bash
# env settings
APP_DIR="/app/emby"
export LD_LIBRARY_PATH="${APP_DIR}"
export FONTCONFIG_PATH="${APP_DIR}"/etc/fonts
if [ -d "/lib/x86_64-linux-gnu" ]; then
export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri:"${APP_DIR}"/dri
fi
export SSL_CERT_FILE="${APP_DIR}"/etc/ssl/certs/ca-certificates.crt
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8096" \
s6-setuidgid abc /app/emby/EmbyServer \
-programdata /config \
-ffdetect /app/emby/ffdetect \
-ffmpeg /app/emby/ffmpeg \
-ffprobe /app/emby/ffprobe \
-restartexitcode 3

View File

@@ -0,0 +1 @@
longrun

View File

@@ -1,24 +0,0 @@
#!/usr/bin/with-contenv bash
# set umask
if [ -n "${UMASK_SET}" ] && [ -z "${UMASK}" ]; then
echo -e "You are using a legacy method of defining umask\nplease update your environment variable from UMASK_SET to UMASK\nto keep the functionality after July 2021"
umask ${UMASK_SET}
fi
# env settings
APP_DIR="/app/emby"
export LD_LIBRARY_PATH="${APP_DIR}"
export FONTCONFIG_PATH="${APP_DIR}"/etc/fonts
if [ -d "/lib/x86_64-linux-gnu" ]; then
export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri:"${APP_DIR}"/dri
fi
export SSL_CERT_FILE="${APP_DIR}"/etc/ssl/certs/ca-certificates.crt
exec \
s6-setuidgid abc /app/emby/EmbyServer \
-programdata /config \
-ffdetect /app/emby/ffdetect \
-ffmpeg /app/emby/ffmpeg \
-ffprobe /app/emby/ffprobe \
-restartexitcode 3