From a6c33129eb35cecc6c2815b78fc5978bd77d986f Mon Sep 17 00:00:00 2001 From: varpon Date: Sun, 12 Apr 2026 19:14:43 +0000 Subject: [PATCH 1/4] revert local changes to build pipeline --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1216e13..9ade33f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,7 +2,7 @@ name: Build FreeBSD Container on: push: - branches: [main,new-container] + branches: [main] paths-ignore: ['*.md', 'LICENSE', '.gitignore'] pull_request: branches: [main] From 67894a317555af8becd42eb191bac24bfe5a69bf Mon Sep 17 00:00:00 2001 From: varpon Date: Sun, 12 Apr 2026 19:22:38 +0000 Subject: [PATCH 2/4] use `exec s6-setuidgid` when starting the service --- root/etc/services.d/authelia/run | 10 +--------- root/etc/services.d/authelia/run.pkg | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/root/etc/services.d/authelia/run b/root/etc/services.d/authelia/run index 52a6592..4c2bf5a 100755 --- a/root/etc/services.d/authelia/run +++ b/root/etc/services.d/authelia/run @@ -1,15 +1,7 @@ #!/bin/sh # Authelia s6 service -#if [ -z "$TUNNEL_TOKEN" ]; then -# echo "[WARN] TUNNEL_TOKEN is not set. Starting in CIT mock mode." -# # Log version to prove binary is functional -# /usr/local/bin/authelia --version -# # Listen on port 9091 to satisfy CI port check -# exec /usr/bin/nc -lk 0.0.0.0 9091 -#fi - echo "[INFO] Starting authelia..." # Standard start command for authelia -/app/authelia --config /config/authelia.yml +exec s6-setuidgid bsd /app/authelia --config /config/authelia.yml diff --git a/root/etc/services.d/authelia/run.pkg b/root/etc/services.d/authelia/run.pkg index 75107f4..d6d6f09 100755 --- a/root/etc/services.d/authelia/run.pkg +++ b/root/etc/services.d/authelia/run.pkg @@ -1,15 +1,7 @@ #!/bin/sh # Authelia s6 service -#if [ -z "$TUNNEL_TOKEN" ]; then -# echo "[WARN] TUNNEL_TOKEN is not set. Starting in CIT mock mode." -# # Log version to prove binary is functional -# /usr/local/bin/authelia --version -# # Listen on port 9091 to satisfy CI port check -# exec /usr/bin/nc -lk 0.0.0.0 9091 -#fi - echo "[INFO] Starting authelia..." # Standard start command for authelia -exec /usr/local/bin/authelia --config /config/authelia.yml +exec s6-setuidgid bsd exec /usr/local/bin/authelia --config /config/authelia.yml From 2ce41aaf6082edb9e74f625985f16d1057cda1ed Mon Sep 17 00:00:00 2001 From: varpon Date: Sun, 12 Apr 2026 20:13:08 +0000 Subject: [PATCH 3/4] cleanup Containerfiles --- Containerfile | 9 +++++---- Containerfile.j2 | 9 +++++---- Containerfile.pkg | 16 +++++++++++++--- Containerfile.pkg.j2 | 16 +++++++++++++--- 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/Containerfile b/Containerfile index a8bb7ce..1c240b3 100644 --- a/Containerfile +++ b/Containerfile @@ -47,11 +47,12 @@ RUN APP_VERSION=$(fetch -qo - "${UPSTREAM_URL}" | \ rm /tmp/authelia.tar.gz && \ echo "${APP_VERSION}" > /app/version -# Copy root filesystem -COPY root/ / +# Config directory +RUN mkdir -p /config && chown -R bsd:bsd /config /app -# Set permissions -RUN chmod +x /etc/services.d/authelia/run /healthz +# Copy s6 service files +COPY root/ / +RUN chmod +x /etc/services.d/*/run /etc/cont-init.d/* /healthz 2>/dev/null || true # --- Expose (Injected by Generator) --- EXPOSE 9091 diff --git a/Containerfile.j2 b/Containerfile.j2 index 220ca84..e706e04 100644 --- a/Containerfile.j2 +++ b/Containerfile.j2 @@ -43,11 +43,12 @@ RUN APP_VERSION=$(fetch -qo - "${UPSTREAM_URL}" | \ rm /tmp/authelia.tar.gz && \ echo "${APP_VERSION}" > /app/version -# Copy root filesystem -COPY root/ / +# Config directory +RUN mkdir -p /config && chown -R bsd:bsd /config /app -# Set permissions -RUN chmod +x /etc/services.d/authelia/run /healthz +# Copy s6 service files +COPY root/ / +RUN chmod +x /etc/services.d/*/run /etc/cont-init.d/* /healthz 2>/dev/null || true # --- Expose (Injected by Generator) --- {%- if ports %} diff --git a/Containerfile.pkg b/Containerfile.pkg index d5e6881..57cc1cf 100644 --- a/Containerfile.pkg +++ b/Containerfile.pkg @@ -25,6 +25,10 @@ LABEL org.opencontainers.image.title="Authelia" \ io.daemonless.wip="true" +# Install from FreeBSD packages +RUN pkg update && pkg install -y ${PACKAGES} && \ + pkg clean -ay && rm -rf /var/cache/pkg/* /var/db/pkg/repos/* + # Install dependencies RUN pkg update && \ pkg install -y ${PACKAGES} && \ @@ -32,11 +36,17 @@ RUN pkg update && \ mkdir -p /app && pkg info authelia | sed -n 's/.*Version.*: *//p' > /app/version && \ rm -rf /var/cache/pkg/* /var/db/pkg/repos/* -# Copy root filesystem +# Extract version +RUN mkdir -p /app && \ + pkg info authelia | sed -n 's/.*Version.*: *//p' > /app/version + +# Copy root filesystem and set permissions COPY root/ / +RUN if [ -f /etc/services.d/authelia/run.pkg ]; then \ + mv /etc/services.d/authelia/run.pkg /etc/services.d/authelia/run; \ + fi && \ + chmod +x /etc/services.d/*/run /etc/cont-init.d/* /healthz 2>/dev/null || true -# Set permissions -RUN chmod +x /etc/services.d/authelia/run /healthz # --- Expose (Injected by Generator) --- EXPOSE 9091 diff --git a/Containerfile.pkg.j2 b/Containerfile.pkg.j2 index 079c835..540f6e9 100644 --- a/Containerfile.pkg.j2 +++ b/Containerfile.pkg.j2 @@ -19,6 +19,10 @@ LABEL org.opencontainers.image.title="Authelia" \ io.daemonless.wip="true" +# Install from FreeBSD packages +RUN pkg update && pkg install -y ${PACKAGES} && \ + pkg clean -ay && rm -rf /var/cache/pkg/* /var/db/pkg/repos/* + # Install dependencies RUN pkg update && \ pkg install -y ${PACKAGES} && \ @@ -26,11 +30,17 @@ RUN pkg update && \ mkdir -p /app && pkg info authelia | sed -n 's/.*Version.*: *//p' > /app/version && \ rm -rf /var/cache/pkg/* /var/db/pkg/repos/* -# Copy root filesystem +# Extract version +RUN mkdir -p /app && \ + pkg info authelia | sed -n 's/.*Version.*: *//p' > /app/version + +# Copy root filesystem and set permissions COPY root/ / +RUN if [ -f /etc/services.d/authelia/run.pkg ]; then \ + mv /etc/services.d/authelia/run.pkg /etc/services.d/authelia/run; \ + fi && \ + chmod +x /etc/services.d/*/run /etc/cont-init.d/* /healthz 2>/dev/null || true -# Set permissions -RUN chmod +x /etc/services.d/authelia/run /healthz # --- Expose (Injected by Generator) --- {%- if ports %} From eb340868dae87ec724515fe4a9abcefc38fa969c Mon Sep 17 00:00:00 2001 From: varpon Date: Sun, 12 Apr 2026 20:13:25 +0000 Subject: [PATCH 4/4] fix registry URLs --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f9976d1..d9372bb 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Authelia on FreeBSD. | | | |---|---| | **Port** | 9091 | -| **Registry** | `ghcr.io/varpon/authelia-server` | +| **Registry** | `ghcr.io/daemonless/authelia-server` | | **Source** | [https://github.com/authelia/authelia](https://github.com/authelia/authelia) | | **Website** | [https://authelia.org/](https://authelia.org/) | @@ -24,6 +24,8 @@ Authelia on FreeBSD. | `latest` | **Upstream Binary**. Built from official release. | Most users. Matches Linux Docker behavior. | | `pkg` | **FreeBSD Quarterly**. Uses stable, tested packages. | Most users. Matches Linux Docker behavior. | | `pkg-latest` | **FreeBSD Latest**. Rolling package updates. | Newest FreeBSD packages. | + + ## Prerequisites Before deploying, ensure your host environment is ready. See the [Quick Start Guide](https://daemonless.io/guides/quick-start) for host setup instructions. @@ -37,7 +39,7 @@ Before deploying, ensure your host environment is ready. See the [Quick Start Gu ```yaml services: authelia-server: - image: ghcr.io/varpon/authelia-server:latest + image: ghcr.io/daemonless/authelia-server:latest container_name: authelia-server environment: - PUID=1000 @@ -62,7 +64,7 @@ podman run -d --name authelia-server \ -e TZ=UTC \ -v /path/to/containers/authelia-server:/config \ -v /path/to/containers/authelia-server/data:/data \ - ghcr.io/varpon/authelia-server:latest + ghcr.io/daemonless/authelia-server:latest ``` ### Ansible @@ -71,7 +73,7 @@ podman run -d --name authelia-server \ - name: Deploy authelia-server containers.podman.podman_container: name: authelia-server - image: ghcr.io/varpon/authelia-server:latest + image: ghcr.io/daemonless/authelia-server:latest state: started restart_policy: always env: