2024-05-27 11:07:50 +00:00
|
|
|
FROM docker.io/alpine:3.20 AS builder
|
2021-08-22 12:30:25 +00:00
|
|
|
|
2024-11-25 16:21:08 +00:00
|
|
|
ENV VERSION=26.0.6
|
|
|
|
ENV SHA256_SUM=27e31ee7f2e90f1c282def3cbbb0824f76d0441ef7f0c8ebaf83570d097e83b5
|
2021-08-22 12:30:25 +00:00
|
|
|
|
|
|
|
RUN wget "https://github.com/keycloak/keycloak/releases/download/$VERSION/keycloak-$VERSION.tar.gz"
|
|
|
|
RUN echo "$SHA256_SUM keycloak-$VERSION.tar.gz" | sha256sum -c - || exit 1
|
|
|
|
RUN mkdir -p /keycloak
|
|
|
|
RUN tar xvf keycloak-$VERSION.tar.gz -C /keycloak --strip 1
|
|
|
|
|
2024-05-27 11:07:50 +00:00
|
|
|
FROM docker.io/thallian/alpine-s6:3.20-3.1.6.2
|
2022-11-23 14:11:01 +00:00
|
|
|
|
|
|
|
ENV JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"
|
2021-08-22 12:30:25 +00:00
|
|
|
|
|
|
|
RUN addgroup -g 2222 keycloak
|
|
|
|
RUN adduser -h /home/keycloak -u 2222 -D -G keycloak keycloak
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
2023-12-15 07:14:43 +00:00
|
|
|
openjdk21-jre-headless \
|
2022-02-13 09:35:16 +00:00
|
|
|
bash
|
2021-08-22 12:30:25 +00:00
|
|
|
|
|
|
|
COPY --from=builder --chown=keycloak:keycloak /keycloak /home/keycloak/server
|
2022-02-13 09:35:16 +00:00
|
|
|
|
2023-04-08 10:37:09 +00:00
|
|
|
RUN /home/keycloak/server/bin/kc.sh build --db=postgres --metrics-enabled=true
|
2021-08-22 12:59:55 +00:00
|
|
|
RUN chown -R keycloak:keycloak /home/keycloak
|
2021-08-22 12:30:25 +00:00
|
|
|
|
|
|
|
ADD /rootfs /
|
|
|
|
|