From 9315deda053124b6d2db98240d36e6fe4976cf0b Mon Sep 17 00:00:00 2001 From: royalcat Date: Fri, 26 Jul 2024 13:32:52 +0300 Subject: [PATCH] discord provider fork --- .gitmodules | 3 +++ Dockerfile | 23 +++++++++++++++++++---- providers/keycloak | 1 + 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 .gitmodules create mode 160000 providers/keycloak diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f70ea82 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "providers/keycloak"] + path = providers/keycloak + url = https://github.com/andythorne/keycloak-discord diff --git a/Dockerfile b/Dockerfile index 63281ea..b003b9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,18 @@ -ARG KC_VERSION=25.0.0 +ARG KC_VERSION=25.0 -FROM quay.io/keycloak/keycloak:${KC_VERSION} as builder +# 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 @@ -10,8 +22,11 @@ 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 \ +# 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 diff --git a/providers/keycloak b/providers/keycloak new file mode 160000 index 0000000..af9e562 --- /dev/null +++ b/providers/keycloak @@ -0,0 +1 @@ +Subproject commit af9e5623f74b71530b1f6b9877faf0d50b50f8d2