Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create a keycloak 24 benchmark image
Browse files Browse the repository at this point in the history
thegentlemanphysicist committed Jan 27, 2025
1 parent 1deeae7 commit 71b6026
Showing 2 changed files with 41 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-image-keycloak-benchmark.yml
Original file line number Diff line number Diff line change
@@ -49,8 +49,8 @@ jobs:
with:
context: docker/keycloak
push: true
tags: ${{ env.GITHUB_REGISTRY }}/${{env.IMAGE_NAME}}:dev
file: docker/keycloak/Dockerfile-26-perf
tags: ${{ env.GITHUB_REGISTRY }}/${{env.IMAGE_NAME}}:dev-24
file: docker/keycloak/Dockerfile-24-perf
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

39 changes: 39 additions & 0 deletions docker/keycloak/Dockerfile-24-perf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM maven:3.8.5-openjdk-17-slim AS extensions-builder

COPY ./extensions-24 /tmp/
WORKDIR /tmp/
RUN mvn -B clean package --file pom.xml

FROM registry.redhat.io/rhbk/keycloak-rhel9:24-17 as builder

# Enable health and metrics support
ENV KC_HEALTH_ENABLED=true
ENV KC_METRICS_ENABLED=true

# Configure a database vendor
ENV KC_DB=postgres

# un-comment when dataset required for loadtests
COPY ./dataset-providers/keycloak-benchmark-dataset-0.15-SNAPSHOT.jar /opt/keycloak/providers

COPY --from=extensions-builder /tmp/services/target/bcgov-services-1.0.0.jar /opt/keycloak/providers/

WORKDIR /opt/keycloak

RUN /opt/keycloak/bin/kc.sh build

FROM registry.redhat.io/rhbk/keycloak-rhel9:24-17

COPY --from=builder /opt/keycloak/ /opt/keycloak/

# copy the theme directory to `/opt/keycloak/themes/` for now, but we can consider to archive to be deployed later.
COPY ./extensions-24/themes/src/main/resources/theme /opt/keycloak/themes

COPY ./configuration/24/keycloak.conf /opt/keycloak/conf

COPY ./configuration/24/quarkus.properties /opt/keycloak/conf

COPY ./configuration/24/keycloak-default-user-profile.json /tmp

# change these values to point to a running postgres instance
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]

0 comments on commit 71b6026

Please sign in to comment.