From 964f8390e7d729667e67a78080f128757e73c50a Mon Sep 17 00:00:00 2001 From: Johannes Lichtenberger Date: Sat, 13 Jul 2024 13:29:36 +0200 Subject: [PATCH] Create Dockerfile --- tests/resources/Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/resources/Dockerfile diff --git a/tests/resources/Dockerfile b/tests/resources/Dockerfile new file mode 100644 index 0000000..0b4d3f7 --- /dev/null +++ b/tests/resources/Dockerfile @@ -0,0 +1,21 @@ +FROM registry.access.redhat.com/ubi9 AS ubi-micro-build +RUN mkdir -p /mnt/rootfs +RUN dnf install --installroot /mnt/rootfs jq curl \ + --releasever 9 --setopt install_weak_deps=false --nodocs -y; \ + dnf --installroot /mnt/rootfs clean all + +FROM quay.io/keycloak/keycloak:25.0.1 + +# Copy dependencies from ubi-micro-build stage +COPY --from=ubi-micro-build /mnt/rootfs / + + +# Copy the necessary scripts into the container +COPY wait-for-keycloak.sh /opt/keycloak/scripts/wait-for-keycloak.sh +COPY create-sirix-users.sh /opt/keycloak/scripts/create-sirix-users.sh + +USER root + +RUN chmod +x /opt/keycloak/scripts/wait-for-keycloak.sh /opt/keycloak/scripts/create-sirix-users.sh + +# Switch back to the default Keycloak user