Files
authelia/Dockerfile.dev
T
renovate[bot] f2f6b7ad2f build(deps): update node.js to ef24c50 (#13084)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [node](https://hub.docker.com/_/node)
([source](https://redirect.github.com/nodejs/node)) | final | digest |
`2d984a1` → `ef24c50` |
| [node](https://hub.docker.com/_/node)
([source](https://redirect.github.com/nodejs/node)) | stage | digest |
`2d984a1` → `ef24c50` |

---

### 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 these
updates 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:eyJjcmVhdGVkSW5WZXIiOiI0NC43MS4wIiwidXBkYXRlZEluVmVyIjoiNDQuNzEuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJkb2NrZXIiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-09-10 01:55:19 +00:00

72 lines
2.3 KiB
Docker

# SPDX-FileCopyrightText: 2026 Authelia
#
# SPDX-License-Identifier: Apache-2.0
# ========================================
# ===== Build image for the frontend =====
# ========================================
FROM node:26-alpine@sha256:ef24c5053d50fdc3e4e56eb4e7ddb7861874ab0fdc797046ba897581deb8e868 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://get.pnpm.io/install.sh && \
echo '3a6b531bfa164f5cac7c8db261cb2eb7bf929d7b8efb3a4eae82425507050e91 /tmp/pnpm-install.sh' | sha256sum -c - && \
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.1-bookworm@sha256:648f440f42a0958804efb24df176f806f9d353b41f1c0627f666428e40310f6b 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..." && \
CGO_ENABLED=1 CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong" CGO_LDFLAGS="-Wl,-z,relro,-z,now" go build \
-tags dev -ldflags "-linkmode=external -s -w ${LDFLAGS_EXTRA}" -trimpath -buildmode=pie -o authelia ./cmd/authelia
# ===================================
# ===== Authelia official image =====
# ===================================
FROM authelia/base:latest@sha256:7823b5bd685dbfe01ebe6851a129cf53a58428074609b7f61514191de59e8f20
WORKDIR /app
ENV \
PATH="/app:${PATH}" \
PUID=0 \
PGID=0 \
X_AUTHELIA_CONFIG="/config/configuration.yml"
COPY --link --from=builder-backend /go/src/app/authelia /go/src/app/LICENSE /go/src/app/entrypoint.sh /go/src/app/healthcheck.sh ./
COPY --link --from=builder-backend --chmod=666 /go/src/app/.healthcheck.env ./
EXPOSE 9091
ENTRYPOINT ["/app/entrypoint.sh"]
HEALTHCHECK --interval=30s --timeout=3s --start-period=1m CMD /app/healthcheck.sh