pin dep versions, add log message for device perms

This commit is contained in:
aptalca
2021-06-23 11:56:52 -04:00
parent 48e6dad122
commit 626efcfa75
8 changed files with 132 additions and 132 deletions

View File

@@ -12,37 +12,35 @@ ARG DEBIAN_FRONTEND="noninteractive"
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
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 \
gnupg && \ gnupg && \
echo "**** install jellyfin *****" && \ echo "**** install jellyfin *****" && \
curl -s https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | apt-key add - && \ curl -s https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | apt-key add - && \
echo 'deb [arch=amd64] https://repo.jellyfin.org/ubuntu focal main' > /etc/apt/sources.list.d/jellyfin.list && \ echo 'deb [arch=amd64] https://repo.jellyfin.org/ubuntu focal main' > /etc/apt/sources.list.d/jellyfin.list && \
echo 'deb [arch=amd64] https://repo.jellyfin.org/ubuntu focal unstable' >> /etc/apt/sources.list.d/jellyfin.list && \ echo 'deb [arch=amd64] https://repo.jellyfin.org/ubuntu focal unstable' >> /etc/apt/sources.list.d/jellyfin.list && \
if [ -z ${JELLYFIN_RELEASE+x} ]; then \ if [ -z ${JELLYFIN_RELEASE+x} ]; then \
JELLYFIN="jellyfin"; \ JELLYFIN="jellyfin"; \
else \ else \
JELLYFIN="jellyfin=${JELLYFIN_RELEASE}"; \ JELLYFIN="jellyfin=${JELLYFIN_RELEASE} jellyfin-server=${JELLYFIN_RELEASE} jellyfin-web=${JELLYFIN_RELEASE}"; \
fi && \ fi && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
at \ at \
i965-va-driver \ i965-va-driver \
intel-media-va-driver-non-free \ intel-media-va-driver-non-free \
${JELLYFIN} \ ${JELLYFIN} \
jellyfin-ffmpeg \ jellyfin-ffmpeg \
jellyfin-server \ libfontconfig1 \
jellyfin-web \ libfreetype6 \
libfontconfig1 \ libssl1.1 \
libfreetype6 \ mesa-va-drivers && \
libssl1.1 \ echo "**** cleanup ****" && \
mesa-va-drivers && \ rm -rf \
echo "**** cleanup ****" && \ /tmp/* \
rm -rf \ /var/lib/apt/lists/* \
/tmp/* \ /var/tmp/*
/var/lib/apt/lists/* \
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /

View File

@@ -12,39 +12,37 @@ ARG DEBIAN_FRONTEND="noninteractive"
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
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 \
gnupg && \ gnupg && \
echo "**** install jellyfin *****" && \ echo "**** install jellyfin *****" && \
curl -s https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | apt-key add - && \ curl -s https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | apt-key add - && \
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 [arch=arm64] https://repo.jellyfin.org/ubuntu focal main' > /etc/apt/sources.list.d/jellyfin.list && \ echo 'deb [arch=arm64] https://repo.jellyfin.org/ubuntu focal main' > /etc/apt/sources.list.d/jellyfin.list && \
echo 'deb [arch=arm64] https://repo.jellyfin.org/ubuntu focal unstable' >> /etc/apt/sources.list.d/jellyfin.list && \ echo 'deb [arch=arm64] https://repo.jellyfin.org/ubuntu focal unstable' >> /etc/apt/sources.list.d/jellyfin.list && \
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 && \
if [ -z ${JELLYFIN_RELEASE+x} ]; then \ if [ -z ${JELLYFIN_RELEASE+x} ]; then \
JELLYFIN="jellyfin"; \ JELLYFIN="jellyfin"; \
else \ else \
JELLYFIN="jellyfin=${JELLYFIN_RELEASE}"; \ JELLYFIN="jellyfin=${JELLYFIN_RELEASE} jellyfin-server=${JELLYFIN_RELEASE} jellyfin-web=${JELLYFIN_RELEASE}"; \
fi && \ fi && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
at \ at \
${JELLYFIN} \ ${JELLYFIN} \
jellyfin-ffmpeg \ jellyfin-ffmpeg \
jellyfin-server \ libfontconfig1 \
jellyfin-web \ libfreetype6 \
libfontconfig1 \ libomxil-bellagio0 \
libfreetype6 \ libomxil-bellagio-bin \
libomxil-bellagio0 \ libraspberrypi0 \
libomxil-bellagio-bin \ libssl1.1 && \
libraspberrypi0 \ echo "**** cleanup ****" && \
libssl1.1 && \ rm -rf \
echo "**** cleanup ****" && \ /tmp/* \
rm -rf \ /var/lib/apt/lists/* \
/tmp/* \ /var/tmp/*
/var/lib/apt/lists/* \
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /

View File

@@ -12,39 +12,37 @@ ARG DEBIAN_FRONTEND="noninteractive"
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
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 \
gnupg && \ gnupg && \
echo "**** install jellyfin *****" && \ echo "**** install jellyfin *****" && \
curl -s https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | apt-key add - && \ curl -s https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | apt-key add - && \
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 [arch=armhf] https://repo.jellyfin.org/ubuntu focal main' > /etc/apt/sources.list.d/jellyfin.list && \ echo 'deb [arch=armhf] https://repo.jellyfin.org/ubuntu focal main' > /etc/apt/sources.list.d/jellyfin.list && \
echo 'deb [arch=armhf] https://repo.jellyfin.org/ubuntu focal unstable' >> /etc/apt/sources.list.d/jellyfin.list && \ echo 'deb [arch=armhf] https://repo.jellyfin.org/ubuntu focal unstable' >> /etc/apt/sources.list.d/jellyfin.list && \
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 && \
if [ -z ${JELLYFIN_RELEASE+x} ]; then \ if [ -z ${JELLYFIN_RELEASE+x} ]; then \
JELLYFIN="jellyfin"; \ JELLYFIN="jellyfin"; \
else \ else \
JELLYFIN="jellyfin=${JELLYFIN_RELEASE}"; \ JELLYFIN="jellyfin=${JELLYFIN_RELEASE} jellyfin-server=${JELLYFIN_RELEASE} jellyfin-web=${JELLYFIN_RELEASE}"; \
fi && \ fi && \
apt-get update && \ apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
at \ at \
${JELLYFIN} \ ${JELLYFIN} \
jellyfin-ffmpeg \ jellyfin-ffmpeg \
jellyfin-server \ libfontconfig1 \
jellyfin-web \ libfreetype6 \
libfontconfig1 \ libomxil-bellagio0 \
libfreetype6 \ libomxil-bellagio-bin \
libomxil-bellagio0 \ libraspberrypi0 \
libomxil-bellagio-bin \ libssl1.1 && \
libraspberrypi0 \ echo "**** cleanup ****" && \
libssl1.1 && \ rm -rf \
echo "**** cleanup ****" && \ /tmp/* \
rm -rf \ /var/lib/apt/lists/* \
/tmp/* \ /var/tmp/*
/var/lib/apt/lists/* \
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /

View File

@@ -64,7 +64,7 @@ This image provides various versions that are available via tags. `latest` tag u
| Tag | Description | | Tag | Description |
| :----: | --- | | :----: | --- |
| latest | Stable Jellyfin releases - Focal baseimage | | latest | Stable Jellyfin releases - Focal baseimage |
| bionic | Stable Jellyfin releases - Bionic baseimage | | bionic | DEPRECATED, no longer updated - Stable Jellyfin releases - Bionic baseimage |
| nightly | Unstable Jellyfin releases | | nightly | Unstable Jellyfin releases |
## Application Setup ## Application Setup
@@ -302,7 +302,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **20.01.21:"** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information. * **23.06.21:** - Add log message if device permissions are incorrect. Pin jellyfin dependency versions to prevent upstream apt repo issues. Deprecate the `bionic` tag.
* **20.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information.
* **05.01.21:** - Add nvidia.icd file to fix missing tonemapping using Nvidia HW. * **05.01.21:** - Add nvidia.icd file to fix missing tonemapping using Nvidia HW.
* **23.11.20:** - Rebase to Focal, branch off Bionic. * **23.11.20:** - Rebase to Focal, branch off Bionic.
* **22.07.20:** - Install nightly from unstable. * **22.07.20:** - Install nightly from unstable.

View File

@@ -17,7 +17,7 @@ available_architectures:
development_versions: true development_versions: true
development_versions_items: development_versions_items:
- { tag: "latest", desc: "Stable Jellyfin releases - Focal baseimage" } - { tag: "latest", desc: "Stable Jellyfin releases - Focal baseimage" }
- { tag: "bionic", desc: "Stable Jellyfin releases - Bionic baseimage" } - { tag: "bionic", desc: "DEPRECATED, no longer updated - Stable Jellyfin releases - Bionic baseimage" }
- { tag: "nightly", desc: "Unstable Jellyfin releases" } - { tag: "nightly", desc: "Unstable Jellyfin releases" }
# container parameters # container parameters
@@ -98,7 +98,8 @@ app_setup_block: |
# changelog # changelog
changelogs: changelogs:
- { date: 20.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information." } - { date: "23.06.21:", desc: "Add log message if device permissions are incorrect. Pin jellyfin dependency versions to prevent upstream apt repo issues. Deprecate the `bionic` tag." }
- { date: "20.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information." }
- { date: "05.01.21:", desc: "Add nvidia.icd file to fix missing tonemapping using Nvidia HW." } - { date: "05.01.21:", desc: "Add nvidia.icd file to fix missing tonemapping using Nvidia HW." }
- { date: "23.11.20:", desc: "Rebase to Focal, branch off Bionic." } - { date: "23.11.20:", desc: "Rebase to Focal, branch off Bionic." }
- { date: "22.07.20:", desc: "Install nightly from unstable." } - { date: "22.07.20:", desc: "Install nightly from unstable." }

View File

@@ -2,18 +2,18 @@
# create directories # create directories
mkdir -p \ mkdir -p \
/config/{log,data/transcodes,cache} \ /config/{log,data/transcodes,cache} \
/data \ /data \
/transcode /transcode
# permissions # permissions
chown abc:abc \ chown abc:abc \
/config \ /config \
/config/* \ /config/* \
/data \ /data \
/config/data/transcodes \ /config/data/transcodes \
/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

@@ -4,21 +4,24 @@ FILES=$(find /dev/dri /dev/dvb /dev/vchiq /dev/vc-mem /dev/video1? -type c -prin
for i in $FILES for i in $FILES
do do
VIDEO_GID=$(stat -c '%g' "$i") VIDEO_GID=$(stat -c '%g' "$i")
if ! id -G abc | grep -qw "$VIDEO_GID"; then if ! id -G abc | grep -qw "$VIDEO_GID"; then
VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}') VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}')
if [ -z "${VIDEO_NAME}" ]; then if [ -z "${VIDEO_NAME}" ]; then
VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c8)" VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c8)"
groupadd "$VIDEO_NAME" groupadd "$VIDEO_NAME"
groupmod -g "$VIDEO_GID" "$VIDEO_NAME" groupmod -g "$VIDEO_GID" "$VIDEO_NAME"
fi fi
usermod -a -G "$VIDEO_NAME" abc usermod -a -G "$VIDEO_NAME" abc
fi if [ $(stat -c '%A' "${i}" | cut -b 8,9) != "rw" ]; then
echo -e "**** The device ${i} does not have group read/write permissions, which might prevent hardware transcode from functioning correctly. To fix it, you can run the following on your docker host: ****\nsudo chmod g+rw ${i}\n"
fi
fi
done done
# openmax lib loading # openmax lib loading
if [ -e "/opt/vc/lib" ] && [ ! -e "/etc/ld.so.conf.d/00-vmcs.conf" ]; then if [ -e "/opt/vc/lib" ] && [ ! -e "/etc/ld.so.conf.d/00-vmcs.conf" ]; then
echo "[jellyfin-init] Pi Libs detected loading" echo "[jellyfin-init] Pi Libs detected loading"
echo "/opt/vc/lib" > "/etc/ld.so.conf.d/00-vmcs.conf" echo "/opt/vc/lib" > "/etc/ld.so.conf.d/00-vmcs.conf"
ldconfig ldconfig
fi fi

View File

@@ -1,16 +1,17 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
export JELLYFIN_DATA_DIR="/config/data" \ export \
JELLYFIN_CONFIG_DIR="/config" \ JELLYFIN_DATA_DIR="/config/data" \
JELLYFIN_LOG_DIR="/config/log" \ JELLYFIN_CONFIG_DIR="/config" \
JELLYFIN_CACHE_DIR="/config/cache" \ JELLYFIN_LOG_DIR="/config/log" \
JELLYFIN_WEB_DIR="/usr/share/jellyfin/web" JELLYFIN_CACHE_DIR="/config/cache" \
JELLYFIN_WEB_DIR="/usr/share/jellyfin/web"
if [ -n "${UMASK_SET}" ] && [ -z "${UMASK}" ]; then 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" 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} umask ${UMASK_SET}
fi fi
exec \ exec \
s6-setuidgid abc /usr/bin/jellyfin \ s6-setuidgid abc /usr/bin/jellyfin \
--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg