mirror of
https://github.com/authelia/authelia.git
synced 2026-10-28 09:34:52 +08:00
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | authelia/base | final | digest | `ad4e6b1` → `8b758c7` | --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/authelia/authelia). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzEuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE3MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyIsImRvY2tlciJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
70 lines
2.2 KiB
Docker
70 lines
2.2 KiB
Docker
# SPDX-FileCopyrightText: 2026 Authelia
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# ========================================
|
|
# ===== Build image for the frontend =====
|
|
# ========================================
|
|
FROM node:26-alpine@sha256:6f08a523443ddedf52941874c203475b0ad503e859ad70cb26ab8be9a517dbd5 AS builder-frontend
|
|
|
|
WORKDIR /node/src/app
|
|
|
|
ENV \
|
|
SHELL="/bin/sh" \
|
|
PNPM_HOME="/usr/local"
|
|
|
|
COPY --link web ./
|
|
|
|
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
|
wget -qO /tmp/pnpm-install.sh https://raw.githubusercontent.com/pnpm/get.pnpm.io/b7cf47fb3ca4411d8bae39a49f059f830582d3bc/install.sh && \
|
|
ENV="/root/.profile" sh /tmp/pnpm-install.sh && \
|
|
pnpm install --frozen-lockfile --ignore-scripts --store-dir /pnpm/store && \
|
|
pnpm coverage
|
|
|
|
# =======================================
|
|
# ===== Build image for the backend =====
|
|
# =======================================
|
|
FROM golang:1.27.2-bookworm@sha256:5cf287a799e6b94384bad13d16b14904c531f51ba65792237e122ce42b392f61 AS builder-backend
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY --link go.mod go.sum ./
|
|
|
|
RUN \
|
|
echo ">> Downloading go modules..." && \
|
|
go mod download
|
|
|
|
COPY --link / ./
|
|
|
|
# Prepare static files to be embedded in Go binary
|
|
COPY --link --from=builder-frontend /node/src/internal/server/public_html internal/server/public_html
|
|
|
|
ARG LDFLAGS_EXTRA
|
|
|
|
RUN \
|
|
mv api internal/server/public_html/api && \
|
|
echo ">> Starting go build (coverage via -cover)..." && \
|
|
CGO_ENABLED=1 CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong" CGO_LDFLAGS="-Wl,-z,relro,-z,now" go build -tags dev -cover -covermode=atomic \
|
|
-ldflags "${LDFLAGS_EXTRA}" -o authelia ./cmd/authelia
|
|
|
|
# ===================================
|
|
# ===== Authelia official image =====
|
|
# ===================================
|
|
FROM authelia/base:latest@sha256:8b758c78548f64a14f6d16d37f647a6364afce65f71f19ca0ae5ab431ae6196a
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --link --from=builder-backend /go/src/app/authelia /go/src/app/LICENSE /go/src/app/healthcheck.sh ./
|
|
|
|
COPY --link --from=builder-backend --chmod=666 /go/src/app/.healthcheck.env ./
|
|
|
|
EXPOSE 9091
|
|
|
|
ENV \
|
|
PATH="/app:${PATH}" \
|
|
GOCOVERDIR="/authelia/coverage/" \
|
|
X_AUTHELIA_CONFIG="/config/configuration.yml"
|
|
|
|
CMD ["authelia"]
|
|
HEALTHCHECK --interval=30s --timeout=3s CMD /app/healthcheck.sh
|