2022-07-12 16:41:04 +00:00
|
|
|
FROM docker.io/alpine:3.16 AS builder
|
2021-08-22 12:30:25 +00:00
|
|
|
|
2022-07-02 16:06:46 +00:00
|
|
|
ENV VERSION=18.0.2
|
|
|
|
ENV SHA256_SUM=c704f3bb68c28214298291b217c1658e4bb011e338b09c19f82f30b98340861a
|
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
|
|
|
|
|
2022-07-12 16:41:04 +00:00
|
|
|
FROM docker.io/thallian/alpine-s6:3.16
|
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 \
|
2022-02-13 09:35:16 +00:00
|
|
|
openjdk17-jre-headless \
|
|
|
|
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
|
|
|
|
|
|
|
RUN /home/keycloak/server/bin/kc.sh build --db postgres
|
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 /
|
|
|
|
|