meldestelle/config/docker/keycloak/Dockerfile
Stefan Mogeritsch 0a0f5af3bd refactor: remove Dockerfile syntax directives to simplify and standardize definitions
Removed `# syntax=docker/dockerfile:1.8` from various Dockerfiles as it is no longer needed. Updated `.gitea/workflows/docker-publish.yaml` to enhance ARM64 build reliability with host driver enforcement and commented out unused caching configurations for clarity.
2026-02-13 16:59:02 +01:00

35 lines
987 B
Docker

# ===================================================================
# Production-Ready Keycloak Dockerfile
# ===================================================================
# Based on: quay.io/keycloak/keycloak:26.4
# Features:
# - Pre-built optimized image (faster startup)
# - Security hardening
# - Health monitoring
# ===================================================================
ARG KEYCLOAK_IMAGE_TAG
FROM quay.io/keycloak/keycloak:${KEYCLOAK_IMAGE_TAG}
LABEL maintainer="Meldestelle Development Team"
LABEL description="Production-ready Keycloak for Meldestelle authentication"
LABEL version="${KEYCLOAK_IMAGE_TAG}"
# Set environment variables for build
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true
ENV KC_DB=postgres
WORKDIR /opt/keycloak
# Pre-build Keycloak for faster startup
RUN /opt/keycloak/bin/kc.sh build \
--db=postgres \
--health-enabled=true \
--metrics-enabled=true
# Set user
USER 1000
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]