Rebase to 3.17, migrate to s6v3

This commit is contained in:
TheSpad 2023-02-13 10:02:47 +00:00
parent 2e982160fc
commit f6c19aac35
No known key found for this signature in database
GPG Key ID: 08F06191F4587860
23 changed files with 77 additions and 40 deletions

View File

@ -15,6 +15,6 @@ trim_trailing_whitespace = false
indent_style = space
indent_size = 2
[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}]
[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}]
indent_style = space
indent_size = 4

View File

@ -0,0 +1,12 @@
name: Comment on invalid interaction
on:
issues:
types:
- labeled
jobs:
add-comment-on-invalid:
if: github.event.label.name == 'invalid'
permissions:
issues: write
uses: linuxserver/github-workflows/.github/workflows/invalid-interaction-helper.yml@v1
secrets: inherit

View File

@ -8,6 +8,6 @@ jobs:
steps:
- uses: actions/first-interaction@v1
with:
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-davos/blob/master/.github/ISSUE_TEMPLATE/issue.bug.yml) or [feature](https://github.com/linuxserver/docker-davos/blob/master/.github/ISSUE_TEMPLATE/issue.feature.yml) issue templates!'
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-davos/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}

9
.github/workflows/permissions.yml vendored Normal file
View File

@ -0,0 +1,9 @@
name: Permission check
on:
pull_request:
paths:
- '**/run'
- '**/finish'
jobs:
permission_check:
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1

View File

@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM openjdk:8-alpine as buildstage
ARG DAVOS_RELEASE
@ -27,7 +29,7 @@ RUN \
cp build/libs/*.jar /davos.jar && \
chmod 755 /davos.jar
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
FROM ghcr.io/linuxserver/baseimage-alpine:3.17
# set version label
ARG BUILD_DATE
@ -38,7 +40,6 @@ LABEL maintainer="JAGFin1,Thelamer"
# install packages
RUN \
apk add --no-cache \
curl \
nss \
openjdk8-jre \
sqlite-libs

View File

@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM openjdk:8-alpine as buildstage
ARG DAVOS_RELEASE
@ -27,7 +29,7 @@ RUN \
cp build/libs/*.jar /davos.jar && \
chmod 755 /davos.jar
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17
# set version label
ARG BUILD_DATE
@ -38,7 +40,6 @@ LABEL maintainer="JAGFin1,Thelamer"
# install packages
RUN \
apk add --no-cache \
curl \
nss \
openjdk8-jre \
sqlite-libs

View File

@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM openjdk:8-alpine as buildstage
ARG DAVOS_RELEASE
@ -27,7 +29,7 @@ RUN \
cp build/libs/*.jar /davos.jar && \
chmod 755 /davos.jar
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17
# set version label
ARG BUILD_DATE
@ -38,7 +40,6 @@ LABEL maintainer="JAGFin1,Thelamer"
# install packages
RUN \
apk add --no-cache \
curl \
nss \
openjdk8-jre \
sqlite-libs

26
Jenkinsfile vendored
View File

@ -59,7 +59,7 @@ pipeline {
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/call_invalid_helper.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
}
script{
env.LS_RELEASE_NUMBER = sh(
@ -815,19 +815,19 @@ pipeline {
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
if [ "${CI}" == "false" ]; then
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG}
docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${SEMVER}
@ -835,13 +835,13 @@ pipeline {
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${SEMVER}
fi
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker push ${MANIFESTIMAGE}:amd64-latest
docker push ${MANIFESTIMAGE}:arm32v7-latest
docker push ${MANIFESTIMAGE}:arm64v8-latest
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:amd64-latest
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker push ${MANIFESTIMAGE}:arm32v7-latest
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
docker push ${MANIFESTIMAGE}:arm64v8-latest
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
if [ -n "${SEMVER}" ]; then
docker push ${MANIFESTIMAGE}:amd64-${SEMVER}
@ -987,12 +987,12 @@ pipeline {
sh 'echo "build aborted"'
}
else if (currentBuild.currentResult == "SUCCESS"){
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 1681177,\
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
else {
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\
sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"color": 16711680,\
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}

View File

@ -56,7 +56,7 @@ The architectures supported by this image are:
| :----: | :----: | ---- |
| x86-64 | ✅ | amd64-\<version tag\> |
| arm64 | ✅ | arm64v8-\<version tag\> |
| armhf| ✅ | arm32v7-\<version tag\> |
| armhf | ✅ | arm32v7-\<version tag\> |
## Application Setup
@ -78,9 +78,10 @@ services:
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
volumes:
- <path to data>:/config
- <path to downloads folder>:/download
- /path/to/data>:/config
- /path/to/downloads/folder:/download
ports:
- 8080:8080
restart: unless-stopped
@ -93,11 +94,13 @@ docker run -d \
--name=davos \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-p 8080:8080 \
-v <path to data>:/config \
-v <path to downloads folder>:/download \
-v /path/to/data>:/config \
-v /path/to/downloads/folder:/download \
--restart unless-stopped \
lscr.io/linuxserver/davos:latest
```
## Parameters
@ -109,6 +112,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-p 8080` | This is the default port that davos runs under |
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-v /config` | davos's config location. This is where it stores its database file and logs. |
| `-v /download` | davos's file download location |
@ -221,6 +225,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **13.02.23:** - Rebase to Alpine 3.17, migrate to s6v3.
* **15.01.22:** - Rebasing to alpine 3.15.
* **01.06.20:** - Rebasing to alpine 3.12.
* **19.12.19:** - Rebasing to alpine 3.11.

View File

@ -18,8 +18,8 @@ available_architectures:
param_container_name: "{{ project_name }}"
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "<path to data>", desc: "davos's config location. This is where it stores its database file and logs." }
- { vol_path: "/download", vol_host_path: "<path to downloads folder>", desc: "davos's file download location" }
- { vol_path: "/config", vol_host_path: "/path/to/data>", desc: "davos's config location. This is where it stores its database file and logs." }
- { vol_path: "/download", vol_host_path: "/path/to/downloads/folder", desc: "davos's file download location" }
param_usage_include_ports: true
param_ports:
@ -32,6 +32,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "13.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3." }
- { date: "15.01.22:", desc: "Rebasing to alpine 3.15." }
- { date: "01.06.20:", desc: "Rebasing to alpine 3.12." }
- { date: "19.12.19:", desc: "Rebasing to alpine 3.11." }

View File

@ -1,8 +0,0 @@
#!/usr/bin/with-contenv bash
# permissions
chown -R abc:abc \
/app \
/config
chown abc:abc \
/download

View File

@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# permissions
lsiown -R abc:abc \
/config
lsiown abc:abc \
/download

View File

@ -0,0 +1 @@
oneshot

View File

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

View File

@ -0,0 +1 @@
3

6
root/etc/s6-rc.d/svc-davos/run Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8080" \
s6-setuidgid abc /usr/bin/java -jar /app/davos/davos.jar

View File

@ -0,0 +1 @@
longrun

View File

@ -1,4 +0,0 @@
#!/usr/bin/with-contenv bash
exec \
s6-setuidgid abc /usr/bin/java -jar /app/davos/davos.jar