mancala/apps/keycloak/Dockerfile
Halit Aksoy d52960fa0a feat(keycloak): add a login theme in the game's look
The mancala login theme extends keycloak.v2 with one stylesheet: the game's
app bar and logo, the board's colors, pit-shaped inputs, pill buttons and a
board with stones on top of the card. Dark colors follow the system color
scheme. The realm turns the theme on and offers English and Turkish.

The test container now loads the theme and checks that the login page uses
it in the requested language.
2026-10-16 01:13:20 +03:00

24 lines
876 B
Docker

# Keycloak with the mancala extension and realm baked in.
# Build context: apps/keycloak
FROM maven:3.9.11-eclipse-temurin-21 AS extension
WORKDIR /build
COPY extension/pom.xml .
COPY extension/src src
RUN mvn -B -q package -Dmaven.test.skip=true
# Keep the Keycloak version in sync with keycloak.version in extension/pom.xml
FROM quay.io/keycloak/keycloak:26.7.5 AS builder
ENV KC_DB=postgres
ENV KC_HEALTH_ENABLED=true
COPY --from=extension /build/target/mancala-keycloak-extension.jar /opt/keycloak/providers/
RUN /opt/keycloak/bin/kc.sh build
FROM quay.io/keycloak/keycloak:26.7.5
COPY --from=builder /opt/keycloak/ /opt/keycloak/
# Imported on startup only if the realm does not exist yet.
COPY realm/mancala-realm.json /opt/keycloak/data/import/
COPY themes/ /opt/keycloak/themes/
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
CMD ["start", "--optimized", "--import-realm"]