Skip to content

Commit

Permalink
Rebase to alpine 3.17
Browse files Browse the repository at this point in the history
  • Loading branch information
nemchik committed Feb 13, 2023
1 parent 0ff8a16 commit 32440d8
Show file tree
Hide file tree
Showing 15 changed files with 59 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 12 additions & 0 deletions .github/workflows/call_invalid_helper.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-duckdns/blob/master/.github/ISSUE_TEMPLATE/issue.bug.yml) or [feature](https://github.com/linuxserver/docker-duckdns/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-duckdns/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
repo-token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions .github/workflows/permissions.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.16
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:3.17

# set version label
ARG BUILD_DATE
Expand All @@ -10,7 +12,6 @@ LABEL maintainer="aptalca"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
logrotate

# add local files
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.16
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17

# set version label
ARG BUILD_DATE
Expand All @@ -10,7 +12,6 @@ LABEL maintainer="aptalca"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
logrotate

# add local files
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.16
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.17

# set version label
ARG BUILD_DATE
Expand All @@ -10,7 +12,6 @@ LABEL maintainer="aptalca"
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
logrotate

# add local files
Expand Down
24 changes: 12 additions & 12 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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 ./root/donate.txt'
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 ./root/donate.txt'
}
script{
env.LS_RELEASE_NUMBER = sh(
Expand Down Expand Up @@ -803,33 +803,33 @@ 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}
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${SEMVER}
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-${EXT_RELEASE_TAG}
docker push ${MANIFESTIMAGE}:amd64-latest
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
docker push ${MANIFESTIMAGE}:arm32v7-latest
docker push ${MANIFESTIMAGE}:arm64v8-latest
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
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}
Expand Down Expand Up @@ -975,12 +975,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} '''
}
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -80,7 +80,7 @@ services:
environment:
- PUID=1000 #optional
- PGID=1000 #optional
- TZ=Europe/London
- TZ=Etc/UTC #optional
- SUBDOMAINS=subdomain1,subdomain2
- TOKEN=token
- LOG_FILE=false #optional
Expand All @@ -96,13 +96,14 @@ docker run -d \
--name=duckdns \
-e PUID=1000 `#optional` \
-e PGID=1000 `#optional` \
-e TZ=Europe/London \
-e TZ=Etc/UTC `#optional` \
-e SUBDOMAINS=subdomain1,subdomain2 \
-e TOKEN=token \
-e LOG_FILE=false `#optional` \
-v /path/to/appdata/config:/config `#optional` \
--restart unless-stopped \
lscr.io/linuxserver/duckdns:latest

```

## Parameters
Expand All @@ -113,7 +114,7 @@ Container images are configured using parameters passed at runtime (such as thos
| :----: | --- |
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e SUBDOMAINS=subdomain1,subdomain2` | multiple subdomains allowed, comma separated, no spaces |
| `-e TOKEN=token` | DuckDNS token |
| `-e LOG_FILE=false` | Set to `true` to log to file (also need to map /config). |
Expand Down Expand Up @@ -230,6 +231,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **13.02.23:** - Rebase to alpine 3.17.
* **23.09.22:** - Rebase to alpine 3.16 and s6v3.
* **19.09.22:** - Rebase to alpine 3.15.
* **17.05.22:** - Don't allow insecure connections and add timeout.
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "13.02.23:", desc: "Rebase to alpine 3.17." }
- { date: "23.09.22:", desc: "Rebase to alpine 3.16 and s6v3." }
- { date: "19.09.22:", desc: "Rebase to alpine 3.15." }
- { date: "17.05.22:", desc: "Don't allow insecure connections and add timeout." }
Expand Down
1 change: 1 addition & 0 deletions root/app/duck.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bash

# shellcheck source=/dev/null
. /app/duck.conf
RESPONSE=$(curl -sS --max-time 60 "https://www.duckdns.org/update?domains=${SUBDOMAINS}&token=${TOKEN}&ip=")
if [ "${RESPONSE}" = "OK" ]; then
Expand Down
8 changes: 4 additions & 4 deletions root/etc/s6-overlay/s6-rc.d/init-duckdns/run
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/usr/bin/with-contenv bash

#Check to make sure the subdomain and token are set
if [ -z "$SUBDOMAINS" ] || [ -z "$TOKEN" ]; then
if [ -z "${SUBDOMAINS}" ] || [ -z "${TOKEN}" ]; then
echo "Please pass both your subdomain(s) and token as environment variables in your docker run command. See the readme for more details."
sleep infinity
else
echo "Retrieving subdomain and token from the environment variables"
echo -e "SUBDOMAINS=\"${SUBDOMAINS}\" TOKEN=\"${TOKEN}\"" > /app/duck.conf
echo -e "SUBDOMAINS=\"${SUBDOMAINS}\" TOKEN=\"${TOKEN}\"" >/app/duck.conf
fi

# modify crontab if logging to file
if [ "$LOG_FILE" = "true" ]; then
if [ "${LOG_FILE}" = "true" ]; then
crontab -u abc /defaults/duckcron
echo "log will be output to file"
else
echo "log will be output to docker log"
fi

# permissions
chown -R abc:abc \
lsiown -R abc:abc \
/app \
/config

Expand Down
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/init-duckdns/type
Original file line number Diff line number Diff line change
@@ -1 +1 @@
oneshot
oneshot
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/init-duckdns/up
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/etc/s6-overlay/s6-rc.d/init-duckdns/run
/etc/s6-overlay/s6-rc.d/init-duckdns/run
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-cron/type
Original file line number Diff line number Diff line change
@@ -1 +1 @@
longrun
longrun

0 comments on commit 32440d8

Please sign in to comment.