Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase to 3.21, support non-root running (develop) #306

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:3.20
FROM ghcr.io/linuxserver/baseimage-alpine:3.21

# set version label
ARG BUILD_DATE
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.21

# set version label
ARG BUILD_DATE
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ This image provides various versions that are available via tags. Please read th

| Tag | Available | Description |
| :----: | :----: |--- |
| latest | ✅ | Stable releases from Sonarr (currently v4) |
| develop | ✅ | Development releases from Sonarr (currently v4) |
| latest | ✅ | Stable releases from Sonarr |
| develop | ✅ | Development releases from Sonarr |

## Application Setup

Expand All @@ -82,6 +82,10 @@ The folks over at servarr.com wrote a good [write-up](https://wiki.servarr.com/D

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.
Expand Down Expand Up @@ -140,6 +144,7 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-v /tv` | Location of TV library on disk |
| `-v /downloads` | Location of download managers output directory |
| `--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)

Expand Down Expand Up @@ -303,6 +308,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **12.12.24:** - Rebase to Alpine 3.21.
* **25.05.24:** - Rebase to Alpine 3.20.
* **12.01.24:** - Update download url.
* **30.12.23:** - Rebase to Alpine 3.19.
Expand Down
6 changes: 4 additions & 2 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ available_architectures:
# development version
development_versions: true
development_versions_items:
- {tag: "latest", desc: "Stable releases from Sonarr (currently v4)"}
- {tag: "develop", desc: "Development releases from Sonarr (currently v4)"}
- {tag: "latest", desc: "Stable releases from Sonarr"}
- {tag: "develop", desc: "Development releases from Sonarr"}
# container parameters
param_container_name: "{{ project_name }}"
param_usage_include_vols: true
Expand All @@ -29,6 +29,7 @@ param_usage_include_ports: true
param_ports:
- {external_port: "8989", internal_port: "8989", port_desc: "The port for the Sonarr web interface"}
readonly_supported: true
nonroot_supported: true
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Expand Down Expand Up @@ -86,6 +87,7 @@ init_diagram: |
"sonarr:develop" <- Base Images
# changelog
changelogs:
- {date: "12.12.24:", desc: "Rebase to Alpine 3.21."}
- {date: "25.05.24:", desc: "Rebase to Alpine 3.20."}
- {date: "12.01.24:", desc: "Update download url."}
- {date: "30.12.23:", desc: "Rebase to Alpine 3.19."}
Expand Down
9 changes: 5 additions & 4 deletions root/etc/s6-overlay/s6-rc.d/init-sonarr-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

mkdir -p /run/sonarr-temp

# permissions
lsiown -R abc:abc \
/config \
/run/sonarr-temp
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
lsiown -R abc:abc \
/config \
/run/sonarr-temp
fi
15 changes: 11 additions & 4 deletions root/etc/s6-overlay/s6-rc.d/svc-sonarr/run
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

exec \
s6-notifyoncheck -d -n 300 -w 1000 \
cd /app/sonarr/bin s6-setuidgid abc /app/sonarr/bin/Sonarr \
-nobrowser -data=/config
if [[ -n ${LSIO_NON_ROOT_USER} ]]; then
exec \
s6-notifyoncheck -d -n 300 -w 1000 \
cd /app/sonarr/bin /app/sonarr/bin/Sonarr \
-nobrowser -data=/config
else
exec \
s6-notifyoncheck -d -n 300 -w 1000 \
cd /app/sonarr/bin s6-setuidgid abc /app/sonarr/bin/Sonarr \
-nobrowser -data=/config
fi
Loading