fix docker build
All checks were successful
docker / build-docker (push) Successful in 2m18s

This commit is contained in:
royalcat 2024-07-30 12:22:47 +03:00
parent 4f1707d612
commit 98840d65a6

View file

@ -1,7 +1,7 @@
ARG KC_VERSION=25.0
# Discord provider build
FROM maven:3.9.8-eclipse-temurin-17 AS discord_builder
FROM --platform=$BUILDPLATFORM maven:3.9.8-eclipse-temurin-17 AS discord_builder
RUN mkdir /keycloak-discord
WORKDIR /keycloak-discord
@ -12,16 +12,14 @@ COPY providers/keycloak/src .
RUN mvn package
# Keycloak build
FROM quay.io/keycloak/keycloak:${KC_VERSION} AS builder
FROM --platform=$BUILDPLATFORM 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=docker,hostname:v2
ENV KC_FEATURES_DISABLED=kerberos,ciba,fips
ENV KC_CACHE=local
ENV KC_PROXY=edge
ENV KC_FEATURES=docker,hostname:v2
ENV KC_HTTP_ENABLED=true
ENV KC_PROXY_HEADERS=xforwarded
@ -31,11 +29,9 @@ ENV KC_PROXY_HEADERS=xforwarded
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/
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]