From 9ee3fc7fbdc04fa1dd35c6fcae18c31dd2e6d663 Mon Sep 17 00:00:00 2001 From: thespad Date: Tue, 24 Dec 2024 16:08:10 +0000 Subject: [PATCH] Rebase to 3.21 --- Dockerfile | 4 ++-- Dockerfile.aarch64 | 4 ++-- README.md | 6 ++++++ readme-vars.yml | 2 ++ root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run | 7 ++++--- root/etc/s6-overlay/s6-rc.d/svc-bazarr/run | 12 +++++++++--- 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab814e33..290dd86f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM ghcr.io/linuxserver/unrar:latest AS unrar -FROM ghcr.io/linuxserver/baseimage-alpine:3.20 +FROM ghcr.io/linuxserver/baseimage-alpine:3.21 # set version label ARG BUILD_DATE @@ -53,7 +53,7 @@ RUN \ pip install -U --no-cache-dir \ pip \ wheel && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \ -r /app/bazarr/bin/requirements.txt \ -r /app/bazarr/bin/postgres-requirements.txt && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 7367157b..ab91d287 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -2,7 +2,7 @@ FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.21 # set version label ARG BUILD_DATE @@ -53,7 +53,7 @@ RUN \ pip install -U --no-cache-dir \ pip \ wheel && \ - pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \ + pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \ -r /app/bazarr/bin/requirements.txt \ -r /app/bazarr/bin/postgres-requirements.txt && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ diff --git a/README.md b/README.md index f1c8e5e3..699c3d13 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,10 @@ This image provides various versions that are available via tags. Please read th This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/). +## Non-Root Operation + +This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/). + ## Usage To help you get started creating a container from this image you can either use docker-compose or the docker cli. @@ -133,6 +137,7 @@ Containers are configured using parameters passed at runtime (such as those abov | `-v /movies` | Location of your movies | | `-v /tv` | Location of your TV Shows | | `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). | +| `--user=1000:1000` | Run container with a non-root user. Please [read the docs](https://docs.linuxserver.io/misc/non-root/). | ## Environment variables from files (Docker secrets) @@ -296,6 +301,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **24.12.24:** - Rebase to Alpine 3.21. * **24.06.24:** - Rebase to Alpine 3.20. * **23.12.23:** - Rebase to Alpine 3.19. * **19.09.23:** - Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar). diff --git a/readme-vars.yml b/readme-vars.yml index 72e2f9d7..95e24e01 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -27,6 +27,7 @@ opt_param_volumes: - {vol_path: "/movies", vol_host_path: "/path/to/movies", desc: "Location of your movies"} - {vol_path: "/tv", vol_host_path: "/path/to/tv", desc: "Location of your TV Shows"} readonly_supported: true +nonroot_supported: true # application setup block app_setup_block_enabled: true app_setup_block: | @@ -77,6 +78,7 @@ init_diagram: | "bazarr:latest" <- Base Images # changelog changelogs: + - {date: "24.12.24:", desc: "Rebase to Alpine 3.21."} - {date: "24.06.24:", desc: "Rebase to Alpine 3.20."} - {date: "23.12.23:", desc: "Rebase to Alpine 3.19."} - {date: "19.09.23:", desc: "Install unrar from [linuxserver repo](https://github.com/linuxserver/docker-unrar)."} diff --git a/root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run b/root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run index ae4017a0..e0c72335 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-bazarr-config/run @@ -1,6 +1,7 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash -# permissions -lsiown -R abc:abc \ - /config +if [[ -z ${LSIO_NON_ROOT_USER} ]]; then + lsiown -R abc:abc \ + /config +fi diff --git a/root/etc/s6-overlay/s6-rc.d/svc-bazarr/run b/root/etc/s6-overlay/s6-rc.d/svc-bazarr/run index 85813371..3df693aa 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-bazarr/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-bazarr/run @@ -1,6 +1,12 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash -exec \ - s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 6767" \ - cd /app/bazarr/bin s6-setuidgid abc python3 /app/bazarr/bin/bazarr.py --no-update --config /config +if [[ -z ${LSIO_NON_ROOT_USER} ]]; then + exec \ + s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 6767" \ + cd /app/bazarr/bin s6-setuidgid abc python3 /app/bazarr/bin/bazarr.py --no-update --config /config +else + exec \ + s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 6767" \ + cd /app/bazarr/bin python3 /app/bazarr/bin/bazarr.py --no-update --config /config +fi