konfach-keycloak/Dockerfile
royalcat 0cfb5aa956
Some checks failed
docker / build-docker (linux/arm64) (push) Failing after 1m7s
docker / build-docker (linux/amd64) (push) Failing after 1m10s
fix proxy
2024-07-27 00:29:45 +03:00

47 lines
No EOL
1.3 KiB
Docker

ARG KC_VERSION=25.0
# Discord provider build
FROM maven:3.9.8-eclipse-temurin-17 AS discord_builder
RUN mkdir /keycloak-discord
WORKDIR /keycloak-discord
COPY providers/keycloak/pom.xml .
COPY providers/keycloak/src .
RUN mvn package
# Keycloak build
FROM quay.io/keycloak/keycloak:${KC_VERSION} AS builder
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true
ENV KC_DB=postgres
ENV KC_FEATURES=docker
ENV KC_FEATURES_DISABLED=kerberos,ciba,fips
ENV KC_CACHE=local
ENV KC_PROXY=edge
# ADD --chown=keycloak:keycloak --chmod=644 \
# https://github.com/wadahiro/keycloak-discord/releases/download/v0.5.0/keycloak-discord-0.5.0.jar \
# /opt/keycloak/providers/discord.jar
COPY --from=discord_builder --chown=keycloak:keycloak --chmod=644 \
/keycloak-discord/target/keycloak-discord-0.5.1-SNAPSHOT.jar \
/opt/keycloak/providers/discord.jar
WORKDIR /opt/keycloak
RUN /opt/keycloak/bin/kc.sh build
FROM quay.io/keycloak/keycloak:${KC_VERSION}
COPY --from=builder /opt/keycloak/ /opt/keycloak/
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true
ENV KC_DB=postgres
ENV KC_FEATURES=docker,hostname:v2
ENV KC_FEATURES_DISABLED=kerberos,ciba,fips
ENV KC_CACHE=local
ENV KC_HTTP_ENABLED=true
ENV KC_PROXY_HEADERS=xforwarded
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]