-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile
More file actions
59 lines (50 loc) · 2.27 KB
/
Copy pathContainerfile
File metadata and controls
59 lines (50 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.j2
# --------------------------------------------------------------------------
ARG BASE_VERSION=15
FROM ghcr.io/daemonless/base:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG PACKAGES=""
ARG UPSTREAM_URL="https://api.github.com/repos/authelia/authelia/releases/latest"
ARG UPSTREAM_JQ=".tag_name"
ARG HEALTHCHECK_ENDPOINT="http://localhost:9091/api/health"
LABEL org.opencontainers.image.title="Authelia" \
org.opencontainers.image.description="Authelia on FreeBSD." \
org.opencontainers.image.source="https://github.com/daemonless/authelia-server" \
org.opencontainers.image.url="https://authelia.com/" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Infrastructure" \
io.daemonless.port="9091" \
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.healthcheck-url="${HEALTHCHECK_ENDPOINT}"
# Update to latest patch level
RUN pkg update -r FreeBSD-base && \
pkg upgrade -y -r FreeBSD-base && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
# Download and install authelia
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 && \
echo "${APP_VERSION}" > /app/version
# Config directory
RUN mkdir -p /config && chown -R bsd:bsd /config /app
# 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
# --- Volumes (Injected by Generator) ---
VOLUME /config