Sebastian Hugentobler
86704afa81
All checks were successful
Build Multiarch Container Image / call-reusable-workflow (push) Successful in 4m50s
29 lines
911 B
Docker
29 lines
911 B
Docker
FROM docker.io/alpine:3.20 AS builder
|
|
|
|
ENV VERSION=24.0.4
|
|
ENV SHA256_SUM=d6270be7efbdad03f4d9e709436b0915142f717a6b3797a7b6691bdc6c6303f0
|
|
|
|
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
|
|
|
|
FROM docker.io/thallian/alpine-s6:3.20-3.1.6.2
|
|
|
|
ENV JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"
|
|
|
|
RUN addgroup -g 2222 keycloak
|
|
RUN adduser -h /home/keycloak -u 2222 -D -G keycloak keycloak
|
|
|
|
RUN apk add --no-cache \
|
|
openjdk21-jre-headless \
|
|
bash
|
|
|
|
COPY --from=builder --chown=keycloak:keycloak /keycloak /home/keycloak/server
|
|
|
|
RUN /home/keycloak/server/bin/kc.sh build --db=postgres --metrics-enabled=true
|
|
RUN chown -R keycloak:keycloak /home/keycloak
|
|
|
|
ADD /rootfs /
|
|
|