Merge pull request #32 from linuxserver/3.21

This commit is contained in:
Adam 2025-01-01 22:39:27 +00:00 committed by GitHub
commit 36dcf879cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 42 additions and 21 deletions

View File

@ -23,7 +23,7 @@ jobs:
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of main branch. To disable this trigger, add \`syslog-ng_main\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"syslog-ng"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
echo "Type is \`alpine_repo\`" >> $GITHUB_STEP_SUMMARY
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
@ -96,7 +96,7 @@ jobs:
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"syslog-ng"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"syslog-ng"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
echo "New version \`${EXT_RELEASE}\` found; but not all arch repos updated yet; exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="New version ${EXT_RELEASE} for syslog-ng tag latest is detected, however not all arch repos are updated yet. Will try again later."
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:3.20
FROM ghcr.io/linuxserver/baseimage-alpine:3.21
ARG BUILD_DATE
ARG VERSION
@ -11,7 +11,7 @@ LABEL maintainer="thespad"
RUN \
echo "**** install packages ****" && \
if [ -z ${SYSLOG_NG_VERSION+x} ]; then \
SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:syslog-ng$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add -U --upgrade --no-cache \

View File

@ -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
ARG BUILD_DATE
ARG VERSION
@ -11,7 +11,7 @@ LABEL maintainer="thespad"
RUN \
echo "**** install packages ****" && \
if [ -z ${SYSLOG_NG_VERSION+x} ]; then \
SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp \
SYSLOG_NG_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:syslog-ng$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add -U --upgrade --no-cache \

3
Jenkinsfile vendored
View File

@ -27,8 +27,7 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/syslog-ng'
PR_DOCKERHUB_IMAGE = 'lspipepr/syslog-ng'
DIST_IMAGE = 'alpine'
DIST_TAG = '3.20'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.20/main/'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.21/main/'
DIST_REPO_PACKAGES = 'syslog-ng'
MULTIARCH = 'true'
CI='true'

View File

@ -69,6 +69,10 @@ More info at [syslog-ng](https://www.syslog-ng.com/technical-documents/list/sysl
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 /config` | Stores config and application files |
| `-v /var/log` | Stores logs collected by the syslog-ng service |
| `--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
* **20.12.24:** - Rebase to Alpine 3.21.
* **24.09.24:** - Add opt to log to stdout.
* **24.05.24:** - Rebase to Alpine 3.20.
* **31.01.24:** - Rebase to Alpine 3.19.

View File

@ -15,8 +15,7 @@ repo_vars:
- DEV_DOCKERHUB_IMAGE = 'lsiodev/syslog-ng'
- PR_DOCKERHUB_IMAGE = 'lspipepr/syslog-ng'
- DIST_IMAGE = 'alpine'
- DIST_TAG = '3.20'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.20/main/'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.21/main/'
- DIST_REPO_PACKAGES = 'syslog-ng'
- MULTIARCH = 'true'
- CI='true'

View File

@ -11,8 +11,6 @@ project_blurb_optional_extras_enabled: false
available_architectures:
- {arch: "{{ arch_x86_64 }}", tag: "latest"}
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
# development version
development_versions: false
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
@ -31,6 +29,7 @@ param_ports:
- {external_port: "601", internal_port: "6601/tcp", port_desc: "Syslog TCP"}
- {external_port: "6514", internal_port: "6514/tcp", port_desc: "Syslog TLS"}
readonly_supported: true
nonroot_supported: true
# application setup block
app_setup_block_enabled: true
app_setup_block: |
@ -85,6 +84,7 @@ init_diagram: |
"syslog-ng:latest" <- Base Images
# changelog
changelogs:
- {date: "20.12.24:", desc: "Rebase to Alpine 3.21."}
- {date: "24.09.24:", desc: "Add opt to log to stdout."}
- {date: "24.05.24:", desc: "Rebase to Alpine 3.20."}
- {date: "31.01.24:", desc: "Rebase to Alpine 3.19."}

View File

@ -32,5 +32,7 @@ cat <<-EOF
EOF
fi
lsiown -R abc:abc \
/config
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
lsiown -R abc:abc \
/config
fi

View File

@ -1,10 +1,20 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
if [[ "${LOG_TO_STDOUT,,}" == "true" ]]; then
exec \
s6-setuidgid abc s6-log +.* 1
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
if [[ "${LOG_TO_STDOUT,,}" == "true" ]]; then
exec \
s6-setuidgid abc s6-log +.* 1
else
exec \
s6-setuidgid abc s6-log n30 s10000000 S30000000 T !"gzip -nq9" /config/log/
fi
else
exec \
s6-setuidgid abc s6-log n30 s10000000 S30000000 T !"gzip -nq9" /config/log/
if [[ "${LOG_TO_STDOUT,,}" == "true" ]]; then
exec \
s6-log +.* 1
else
exec \
s6-log n30 s10000000 S30000000 T !"gzip -nq9" /config/log/
fi
fi

View File

@ -1,5 +1,10 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
exec 2>&1 \
s6-setuidgid abc /usr/sbin/syslog-ng -F -f /config/syslog-ng.conf --persist-file /config/syslog-ng.persist --pidfile=/config/syslog-ng.pid --control=/config/syslog-ng.ctl --stderr --no-caps
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
exec 2>&1 \
s6-setuidgid abc /usr/sbin/syslog-ng -F -f /config/syslog-ng.conf --persist-file /config/syslog-ng.persist --pidfile=/config/syslog-ng.pid --control=/config/syslog-ng.ctl --stderr --no-caps
else
exec 2>&1 \
/usr/sbin/syslog-ng -F -f /config/syslog-ng.conf --persist-file /config/syslog-ng.persist --pidfile=/config/syslog-ng.pid --control=/config/syslog-ng.ctl --stderr --no-caps
fi