FROM quay.io/keycloak/keycloak:24.0.5

# Copy custom theme
COPY theme /opt/keycloak/themes

# Optimize Keycloak build with health endpoints and metrics
RUN /opt/keycloak/bin/kc.sh build --health-enabled=true --metrics-enabled=true

ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
