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
16 changes: 9 additions & 7 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ ARG BASE_VERSION=15
FROM ghcr.io/daemonless/base:${BASE_VERSION}

ARG FREEBSD_ARCH=amd64
ARG PACKAGES="authelia"
ARG APP_VERSION="4.39.17"
ARG DOWNLOAD_URL="https://github.com/authelia/authelia/releases/download/v${APP_VERSION}/authelia-v${APP_VERSION}-freebsd-${FREEBSD_ARCH}.tar.gz"
ARG UPSTREAM_URL="https://github.com/authelia/authelia"
ARG PACKAGES=""
ARG UPSTREAM_URL="https://api.github.com/repos/authelia/authelia/releases/latest"
ARG UPSTREAM_JQ=".tag_name"
ARG HEALTHCHECK_ENDPOINT="http://localhost:3000"

LABEL org.opencontainers.image.title="Authelia" \
Expand All @@ -26,8 +25,8 @@ LABEL org.opencontainers.image.title="Authelia" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.upstream-mode=github \
io.daemonless.upstream-repo=authelia/authelia \
# io.daemonless.upstream-url="${UPSTREAM_URL}" \
# io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.upstream-url="${UPSTREAM_URL}" \
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
io.daemonless.wip="true"

Expand All @@ -39,7 +38,10 @@ LABEL org.opencontainers.image.title="Authelia" \
# rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

# Download and install authelia
RUN fetch -qo /tmp/authelia.tar.gz "${DOWNLOAD_URL}" && \
RUN APP_VERSION=$(fetch -qo - "${UPSTREAM_URL}" | \
jq -r "${UPSTREAM_JQ}" | sed -n 's/v\(.*\)/\1/p') && \
echo "Installing Authelia $APP_VERSION" && \
fetch -qo /tmp/authelia.tar.gz "https://github.com/authelia/authelia/releases/download/v${APP_VERSION}/authelia-v${APP_VERSION}-freebsd-${FREEBSD_ARCH}.tar.gz" && \
mkdir -p /app && \
tar -xzf /tmp/authelia.tar.gz -C /app && \
rm /tmp/authelia.tar.gz && \
Expand Down
16 changes: 9 additions & 7 deletions Containerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ ARG BASE_VERSION=15
FROM ghcr.io/daemonless/base:${BASE_VERSION}

ARG FREEBSD_ARCH=amd64
ARG PACKAGES="authelia"
ARG APP_VERSION="4.39.17"
ARG DOWNLOAD_URL="https://github.com/authelia/authelia/releases/download/v${APP_VERSION}/authelia-v${APP_VERSION}-freebsd-${FREEBSD_ARCH}.tar.gz"
ARG UPSTREAM_URL="https://github.com/authelia/authelia"
ARG PACKAGES=""
ARG UPSTREAM_URL="https://api.github.com/repos/authelia/authelia/releases/latest"
ARG UPSTREAM_JQ=".tag_name"
ARG HEALTHCHECK_ENDPOINT="http://localhost:3000"

LABEL org.opencontainers.image.title="{{ title }}" \
Expand All @@ -22,8 +21,8 @@ LABEL org.opencontainers.image.title="{{ title }}" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.upstream-mode=github \
io.daemonless.upstream-repo=authelia/authelia \
# io.daemonless.upstream-url="${UPSTREAM_URL}" \
# io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.upstream-url="${UPSTREAM_URL}" \
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
io.daemonless.wip="true"

Expand All @@ -35,7 +34,10 @@ LABEL org.opencontainers.image.title="{{ title }}" \
# rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

# Download and install authelia
RUN fetch -qo /tmp/authelia.tar.gz "${DOWNLOAD_URL}" && \
RUN APP_VERSION=$(fetch -qo - "${UPSTREAM_URL}" | \
jq -r "${UPSTREAM_JQ}" | sed -n 's/v\(.*\)/\1/p') && \
echo "Installing Authelia $APP_VERSION" && \
fetch -qo /tmp/authelia.tar.gz "https://github.com/authelia/authelia/releases/download/v${APP_VERSION}/authelia-v${APP_VERSION}-freebsd-${FREEBSD_ARCH}.tar.gz" && \
mkdir -p /app && \
tar -xzf /tmp/authelia.tar.gz -C /app && \
rm /tmp/authelia.tar.gz && \
Expand Down
15 changes: 4 additions & 11 deletions Containerfile.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ FROM ghcr.io/daemonless/base:${BASE_VERSION}

ARG FREEBSD_ARCH=amd64
ARG PACKAGES="authelia"
ARG APP_VERSION="latest"

LABEL org.opencontainers.image.title="Authelia" \
org.opencontainers.image.description="Authelia on FreeBSD." \
Expand All @@ -30,23 +29,17 @@ LABEL org.opencontainers.image.title="Authelia" \
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/*

# Download and install authelia
#RUN fetch -qo /tmp/authelia.tar.gz "${DOWNLOAD_URL}" &&
# mkdir -p /usr/local/share/authelia &&
# tar -xzf /tmp/authelia.tar.gz -C /usr/local/share/authelia --strip-components=1 &&
# rm /tmp/authelia.tar.gz &&
# echo "${APP_VERSION}" > /app/version

# Copy root filesystem
COPY root/ /

# Set permissions
RUN chmod +x /etc/services.d/authelia/run /healthz

# Expose
# --- Expose (Injected by Generator) ---
EXPOSE 9091

# Volumes
VOLUME /config
# --- Volumes (Injected by Generator) ---
VOLUME /config /data
21 changes: 9 additions & 12 deletions Containerfile.pkg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM ghcr.io/daemonless/base:${BASE_VERSION}

ARG FREEBSD_ARCH=amd64
ARG PACKAGES="authelia"
ARG APP_VERSION="latest"

LABEL org.opencontainers.image.title="Authelia" \
org.opencontainers.image.description="Authelia on FreeBSD." \
Expand All @@ -24,23 +23,21 @@ LABEL org.opencontainers.image.title="Authelia" \
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/*

# Download and install authelia
#RUN fetch -qo /tmp/authelia.tar.gz "${DOWNLOAD_URL}" &&
# mkdir -p /usr/local/share/authelia &&
# tar -xzf /tmp/authelia.tar.gz -C /usr/local/share/authelia --strip-components=1 &&
# rm /tmp/authelia.tar.gz &&
# echo "${APP_VERSION}" > /app/version

# Copy root filesystem
COPY root/ /

# Set permissions
RUN chmod +x /etc/services.d/authelia/run /healthz

# Expose
EXPOSE 9091
# --- Expose (Injected by Generator) ---
{%- if ports %}
EXPOSE {{ ports | map(attribute='port') | join(' ') }}
{%- endif %}

# Volumes
VOLUME /config
# --- Volumes (Injected by Generator) ---
{%- if volumes %}
VOLUME {{ volumes | map(attribute='path') | join(' ') }}
{%- endif %}
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
- TZ=UTC

volumes:
- /path/to/containers/authelia:/config
- /path/to/containers/authelia/config:/config
- /path/to/containers/authelia/data:/data

ports:
Expand Down
Loading