konfach-keycloak/Dockerfile

29 lines
929 B
Text
Raw Permalink Normal View History

2024-07-26 10:32:52 +00:00
ARG KC_VERSION=25.0
2024-06-11 22:22:29 +00:00
2024-07-26 10:32:52 +00:00
# Discord provider build
2024-07-30 13:52:18 +00:00
FROM --platform=$BUILDPLATFORM maven:3-openjdk-17 AS discord_builder
RUN git clone https://github.com/andythorne/keycloak-discord --branch fix-keycloak-25 --depth 1 /keycloak-discord
2024-07-26 10:32:52 +00:00
WORKDIR /keycloak-discord
RUN mvn package
# Keycloak build
2024-07-30 09:22:47 +00:00
FROM --platform=$BUILDPLATFORM quay.io/keycloak/keycloak:${KC_VERSION} AS builder
2024-06-11 22:22:29 +00:00
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true
ENV KC_DB=postgres
2024-07-30 09:22:47 +00:00
ENV KC_FEATURES=docker,hostname:v2
2024-06-11 22:22:29 +00:00
ENV KC_FEATURES_DISABLED=kerberos,ciba,fips
ENV KC_CACHE=local
2024-07-30 08:32:12 +00:00
ENV KC_HTTP_ENABLED=true
ENV KC_PROXY_HEADERS=xforwarded
2024-06-11 22:22:29 +00:00
2024-07-30 13:52:18 +00:00
COPY --from=discord_builder \
2024-07-30 10:42:26 +00:00
/keycloak-discord/target/keycloak-discord-0.5.1-SNAPSHOT.jar \
/opt/keycloak/providers/discord.jar
2024-06-11 22:22:29 +00:00
WORKDIR /opt/keycloak
RUN /opt/keycloak/bin/kc.sh build
FROM quay.io/keycloak/keycloak:${KC_VERSION}
COPY --from=builder /opt/keycloak/ /opt/keycloak/
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]