Skip to content

Commit b852c84

Browse files
authored
Merge pull request #27 from linuxserver/3.21
2 parents 2d8c4c5 + eb1425a commit b852c84

9 files changed

Lines changed: 76 additions & 48 deletions

File tree

.github/workflows/external_trigger.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
2424
echo "> External trigger running off of master branch. To disable this trigger, add \`airsonic-advanced_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
2525
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
26-
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/airsonic-advanced/airsonic-advanced/releases" | jq -r '.[0] | .tag_name')
27-
echo "Type is \`github_devel\`" >> $GITHUB_STEP_SUMMARY
26+
EXT_RELEASE=$(curl -u "${{ secrets.CR_USER }}:${{ secrets.CR_PAT }}" -sX GET "https://api.github.com/repos/kagemomiji/airsonic-advanced/releases/latest" | jq -r '. | .tag_name')
27+
echo "Type is \`github_stable\`" >> $GITHUB_STEP_SUMMARY
2828
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2929
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
3030
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

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

55
# set version label
66
ARG BUILD_DATE
@@ -21,19 +21,19 @@ RUN \
2121
flac \
2222
fontconfig \
2323
lame \
24-
openjdk11-jre \
24+
openjdk17-jre \
2525
ttf-dejavu \
2626
vorbis-tools && \
2727
echo "**** install airsonic advanced ****" && \
2828
if [ -z ${AIRSONIC_ADVANCED_RELEASE+x} ]; then \
29-
AIRSONIC_ADVANCED_RELEASE=$(curl -sX GET "https://api.github.com/repos/airsonic-advanced/airsonic-advanced/releases" \
29+
AIRSONIC_ADVANCED_RELEASE=$(curl -sX GET "https://api.github.com/repos/kagemomiji/airsonic-advanced/releases/latest" \
3030
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
3131
fi && \
3232
mkdir -p \
3333
${AIRSONIC_ADVANCED_HOME} && \
3434
curl -o \
3535
${AIRSONIC_ADVANCED_HOME}/airsonic.war -L \
36-
"https://github.com/airsonic-advanced/airsonic-advanced/releases/download/${AIRSONIC_ADVANCED_RELEASE}/airsonic.war" && \
36+
"https://github.com/kagemomiji/airsonic-advanced/releases/download/${AIRSONIC_ADVANCED_RELEASE}/airsonic.war" && \
3737
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
3838
echo "**** cleanup ****" && \
3939
rm -rf \

Dockerfile.aarch64

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

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

55
# set version label
66
ARG BUILD_DATE
@@ -21,19 +21,19 @@ RUN \
2121
flac \
2222
fontconfig \
2323
lame \
24-
openjdk11-jre \
24+
openjdk17-jre \
2525
ttf-dejavu \
2626
vorbis-tools && \
2727
echo "**** install airsonic advanced ****" && \
2828
if [ -z ${AIRSONIC_ADVANCED_RELEASE+x} ]; then \
29-
AIRSONIC_ADVANCED_RELEASE=$(curl -sX GET "https://api.github.com/repos/airsonic-advanced/airsonic-advanced/releases" \
29+
AIRSONIC_ADVANCED_RELEASE=$(curl -sX GET "https://api.github.com/repos/kagemomiji/airsonic-advanced/releases/latest" \
3030
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
3131
fi && \
3232
mkdir -p \
3333
${AIRSONIC_ADVANCED_HOME} && \
3434
curl -o \
3535
${AIRSONIC_ADVANCED_HOME}/airsonic.war -L \
36-
"https://github.com/airsonic-advanced/airsonic-advanced/releases/download/${AIRSONIC_ADVANCED_RELEASE}/airsonic.war" && \
36+
"https://github.com/kagemomiji/airsonic-advanced/releases/download/${AIRSONIC_ADVANCED_RELEASE}/airsonic.war" && \
3737
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
3838
echo "**** cleanup ****" && \
3939
rm -rf \

Jenkinsfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pipeline {
1919
DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat')
2020
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
2121
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
22-
EXT_GIT_BRANCH = 'master'
23-
EXT_USER = 'airsonic-advanced'
22+
EXT_GIT_BRANCH = 'main'
23+
EXT_USER = 'kagemomiji'
2424
EXT_REPO = 'airsonic-advanced'
2525
BUILD_VERSION_ARG = 'AIRSONIC_ADVANCED_RELEASE'
2626
LS_USER = 'linuxserver'
@@ -129,23 +129,23 @@ pipeline {
129129
/* ########################
130130
External Release Tagging
131131
######################## */
132-
// If this is a devel github release use the first in an array from github to determine the ext tag
133-
stage("Set ENV github_devel"){
134-
steps{
135-
script{
136-
env.EXT_RELEASE = sh(
137-
script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases | jq -r '.[0] | .tag_name' ''',
138-
returnStdout: true).trim()
139-
}
140-
}
132+
// If this is a stable github release use the latest endpoint from github to determine the ext tag
133+
stage("Set ENV github_stable"){
134+
steps{
135+
script{
136+
env.EXT_RELEASE = sh(
137+
script: '''curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''',
138+
returnStdout: true).trim()
139+
}
140+
}
141141
}
142142
// If this is a stable or devel github release generate the link for the build message
143143
stage("Set ENV github_link"){
144-
steps{
145-
script{
146-
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
147-
}
148-
}
144+
steps{
145+
script{
146+
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE
147+
}
148+
}
149149
}
150150
// Sanitize the release tag and strip illegal docker or github characters
151151
stage("Sanitize tag"){
@@ -980,12 +980,12 @@ pipeline {
980980
"tagger": {"name": "LinuxServer-CI","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
981981
echo "Pushing New release for Tag"
982982
sh '''#! /bin/bash
983-
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases | jq '.[0] |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
983+
curl -H "Authorization: token ${GITHUB_TOKEN}" -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
984984
echo '{"tag_name":"'${META_TAG}'",\
985985
"target_commitish": "master",\
986986
"name": "'${META_TAG}'",\
987987
"body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
988-
printf '","draft": false,"prerelease": true}' >> releasebody.json
988+
printf '","draft": false,"prerelease": false}' >> releasebody.json
989989
paste -d'\\0' start releasebody.json > releasebody.json.done
990990
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
991991
}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ Note that if you want to use [Airsonic's Java jukebox player](https://airsonic.g
7575

7676
This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).
7777

78+
## Non-Root Operation
79+
80+
This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/).
81+
7882
## Usage
7983

8084
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
@@ -149,6 +153,7 @@ Containers are configured using parameters passed at runtime (such as those abov
149153
| `-v /media` | Location of other media. |
150154
| `--device /dev/snd` | Only needed to pass your host sound device to Airsonic's Java jukebox player. |
151155
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
156+
| `--user=1000:1000` | Run container with a non-root user. Please [read the docs](https://docs.linuxserver.io/misc/non-root/). |
152157

153158
## Environment variables from files (Docker secrets)
154159

@@ -312,6 +317,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
312317

313318
## Versions
314319

320+
* **21.12.24:** - Rebase to Alpine 3.21. Switch upstream to track https://github.com/kagemomiji/airsonic-advanced.
315321
* **24.05.24:** - Rebase to Alpine 3.20.
316322
* **20.03.24:** - Rebase to Alpine 3.19.
317323
* **30.05.23:** - Rebase to Alpine 3.18.

jenkins-vars.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
# jenkins variables
44
project_name: docker-airsonic-advanced
5-
external_type: github_devel
6-
release_type: prerelease
5+
external_type: github_stable
6+
release_type: stable
77
release_tag: latest
88
ls_branch: master
99
repo_vars:
10-
- EXT_GIT_BRANCH = 'master'
11-
- EXT_USER = 'airsonic-advanced'
10+
- EXT_GIT_BRANCH = 'main'
11+
- EXT_USER = 'kagemomiji'
1212
- EXT_REPO = 'airsonic-advanced'
1313
- BUILD_VERSION_ARG = 'AIRSONIC_ADVANCED_RELEASE'
1414
- LS_USER = 'linuxserver'

readme-vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ opt_param_device_map: true
3434
opt_param_devices:
3535
- {device_path: "/dev/snd", device_host_path: "/dev/snd", desc: "Only needed to pass your host sound device to Airsonic's Java jukebox player."}
3636
readonly_supported: true
37+
nonroot_supported: true
3738
# application setup block
3839
app_setup_block_enabled: true
3940
app_setup_block: |
@@ -93,6 +94,7 @@ init_diagram: |
9394
"airsonic-advanced:latest" <- Base Images
9495
# changelog
9596
changelogs:
97+
- {date: "21.12.24:", desc: "Rebase to Alpine 3.21. Switch upstream to track https://github.com/kagemomiji/airsonic-advanced."}
9698
- {date: "24.05.24:", desc: "Rebase to Alpine 3.20."}
9799
- {date: "20.03.24:", desc: "Rebase to Alpine 3.19."}
98100
- {date: "30.05.23:", desc: "Rebase to Alpine 3.18."}

root/etc/s6-overlay/s6-rc.d/init-airsonic-advanced-config/run

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
mkdir -p "${AIRSONIC_ADVANCED_SETTINGS}"/transcode
55
mkdir -p "/run/tomcat.4040"
66

7-
lsiown -R abc:abc /config "${AIRSONIC_ADVANCED_SETTINGS}" /run/tomcat.4040
7+
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
8+
lsiown -R abc:abc /config "${AIRSONIC_ADVANCED_SETTINGS}" /run/tomcat.4040
9+
fi
810

911
if [[ ! -e "${AIRSONIC_ADVANCED_SETTINGS}"/transcode/ffmpeg || ! -e "${AIRSONIC_ADVANCED_SETTINGS}"/transcode/flac || ! -e "${AIRSONIC_ADVANCED_SETTINGS}"/transcode/lame ]]; then
1012
ln -sf /usr/bin/ffmpeg "${AIRSONIC_ADVANCED_SETTINGS}"/transcode/

root/etc/s6-overlay/s6-rc.d/svc-airsonic-advanced/run

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,37 @@ URL_BASE="/${CONTEXT_PATH}"
1212
# add option to pass runtime arguments
1313
IFS=" " read -r -a RUN_ARRAY <<< "$JAVA_OPTS"
1414

15+
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
1516
exec \
16-
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 4040" \
17-
cd "${AIRSONIC_ADVANCED_HOME}" s6-setuidgid abc \
18-
java \
19-
-Dlog4j2.formatMsgNoLookups=true \
20-
-Dairsonic.defaultMusicFolder=/music \
21-
-Dairsonic.defaultPlaylistFolder=/playlists \
22-
-Dairsonic.defaultPodcastFolder=/podcasts \
23-
-Dairsonic.home="${AIRSONIC_ADVANCED_SETTINGS}" \
24-
-Djava.awt.headless=true \
25-
-Djava.io.tmpdir="/run/tomcat.4040" \
26-
-Dserver.servlet.context-path="${URL_BASE}" \
27-
-Dserver.host=0.0.0.0 \
28-
-Dserver.port=4040 \
29-
"${RUN_ARRAY[@]}" \
30-
-jar airsonic.war
17+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 4040" \
18+
cd "${AIRSONIC_ADVANCED_HOME}" s6-setuidgid abc \
19+
java \
20+
-Dlog4j2.formatMsgNoLookups=true \
21+
-Dairsonic.defaultMusicFolder=/music \
22+
-Dairsonic.defaultPlaylistFolder=/playlists \
23+
-Dairsonic.defaultPodcastFolder=/podcasts \
24+
-Dairsonic.home="${AIRSONIC_ADVANCED_SETTINGS}" \
25+
-Djava.awt.headless=true \
26+
-Djava.io.tmpdir="/run/tomcat.4040" \
27+
-Dserver.servlet.context-path="${URL_BASE}" \
28+
-Dserver.host=0.0.0.0 \
29+
-Dserver.port=4040 \
30+
"${RUN_ARRAY[@]}" \
31+
-jar airsonic.war
32+
else
33+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 4040" \
34+
cd "${AIRSONIC_ADVANCED_HOME}" \
35+
java \
36+
-Dlog4j2.formatMsgNoLookups=true \
37+
-Dairsonic.defaultMusicFolder=/music \
38+
-Dairsonic.defaultPlaylistFolder=/playlists \
39+
-Dairsonic.defaultPodcastFolder=/podcasts \
40+
-Dairsonic.home="${AIRSONIC_ADVANCED_SETTINGS}" \
41+
-Djava.awt.headless=true \
42+
-Djava.io.tmpdir="/run/tomcat.4040" \
43+
-Dserver.servlet.context-path="${URL_BASE}" \
44+
-Dserver.host=0.0.0.0 \
45+
-Dserver.port=4040 \
46+
"${RUN_ARRAY[@]}" \
47+
-jar airsonic.war
48+
fi

0 commit comments

Comments
 (0)