Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
9 changes: 5 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions Containerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
16 changes: 13 additions & 3 deletions Containerfile.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,28 @@ 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} && \
pkg clean -ay && \
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
Expand Down
16 changes: 13 additions & 3 deletions Containerfile.pkg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,28 @@ 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} && \
pkg clean -ay && \
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 %}
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/) |

Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
10 changes: 1 addition & 9 deletions root/etc/services.d/authelia/run
Original file line number Diff line number Diff line change
@@ -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
10 changes: 1 addition & 9 deletions root/etc/services.d/authelia/run.pkg
Original file line number Diff line number Diff line change
@@ -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