Skip to content

Commit c77c5d8

Browse files
renovate[bot]Langleuleiicamundi
authored
chore(deps): update docker.io/bitnami/keycloak docker tag to v26 (#208)
* chore(deps): update docker.io/bitnami/keycloak docker tag to v26 | datasource | package | from | to | | ---------- | -------------------------- | ---- | -- | | docker | docker.io/bitnami/keycloak | 25 | 26 | * chore(docker): add Keycloak 26 image * chore(docs): update readme * chore(keycloak): overwrite jdbc driver; upstream is too outdated * chore: remove dynamic aws_wrapper version by a static one managed by renovate * fix: downgrade jdbc wrapper to 2.3.9 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Langleu <lars.lange@camunda.com> Co-authored-by: Leo J <153937047+leiicamundi@users.noreply.github.com>
1 parent c3035b5 commit c77c5d8

File tree

9 files changed

+115
-80
lines changed

9 files changed

+115
-80
lines changed

.github/scripts/utils/get_aws_jdbc_wrapper_version.sh

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/build-images.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,6 @@ jobs:
105105
106106
echo "keycloak_full_version=${keycloak_full_version}"
107107
108-
aws_jdbc_wrapper_version=$(
109-
.github/scripts/utils/get_aws_jdbc_wrapper_version.sh "$keycloak_full_version" \
110-
|| { echo "Error: Cannot get aws jdbc wrapper version for keycloak $keycloak_full_version"; exit 1; }
111-
)
112-
113-
echo "aws_jdbc_wrapper_version=${aws_jdbc_wrapper_version}" >> "$GITHUB_ENV"
114-
echo "aws_jdbc_wrapper_version=${aws_jdbc_wrapper_version}"
115-
116108
- name: Build image using Camunda docker build
117109
id: build-image-step
118110
uses: camunda/infra-global-github-actions/build-docker-image@adc932a586d745b8a147a7f52117e683d5c59b54 # main
@@ -124,8 +116,6 @@ jobs:
124116
image_name: ${{ vars.CONTAINER_IMAGE_NAME_CI }}
125117
build_context: ./keycloak-${{ matrix.keycloak_version }}/
126118
build_platforms: linux/amd64,linux/arm64
127-
build_args: |
128-
AWS_JDBC_WRAPPER_VERSION=${{ env.aws_jdbc_wrapper_version }}
129119
extra_tags: | # the ci- prefix ensures a build context, this image is treated as "temporary"
130120
type=sha,enable=true,priority=1000,prefix=ci-${{ matrix.keycloak_version }}-sha-,suffix=,format=short
131121

.watch-latest/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# It is its only purpose.
33

44
# Note: When renovate alerts about a new version of keycloak, please follow the `DEVELOPER.md` new release procedure.
5-
FROM docker.io/bitnami/keycloak:25
5+
FROM docker.io/bitnami/keycloak:26

DEVELOPER.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ Navigate to the `keycloak-<version>` (e.g. `keycloak-24`) directory and execute
2929
keycloak_full_version="$(grep "ARG BASE_IMAGE_NAME=.*$1" ./Dockerfile | awk -F'[:=]' '{print $NF}' | tr -d '"' | awk -F'[:/-]' '{print $1}')"
3030
echo "keycloak_full_version=$keycloak_full_version"
3131

32-
aws_jdbc_wrapper_version="$(../.github/scripts/utils/get_aws_jdbc_wrapper_version.sh $keycloak_full_version)"
33-
echo "aws_jdbc_wrapper_version=$aws_jdbc_wrapper_version"
34-
35-
docker build . -t "docker.io/camunda/keycloak:$keycloak_full_version" --build-arg "AWS_JDBC_WRAPPER_VERSION=$aws_jdbc_wrapper_version"
32+
docker build . -t "docker.io/camunda/keycloak:$keycloak_full_version""
3633
```
3734
3835
This Dockerfile includes the necessary dependencies and configurations for AWS Advanced JDBC Wrapper.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To start the image, run:
2626
```bash
2727
docker run --name mykeycloak -p 8443:8443 \
2828
-e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=change_me \
29-
docker.io/camunda/keycloak:25
29+
docker.io/camunda/keycloak:26
3030
```
3131

3232
Keycloak will start in production mode, using secured HTTPS communication and will be available at [https://localhost:8443](https://localhost:8443).
@@ -83,7 +83,7 @@ Don't forget to set the `serviceAccountName` of the deployment/statefulset to po
8383
To use this image in the Helm chart [bitnami/keycloak](https://artifacthub.io/packages/helm/bitnami/keycloak), update the image used and add the necessary extra environment variables:
8484

8585
```yaml
86-
image: docker.io/camunda/keycloak:25
86+
image: docker.io/camunda/keycloak:26
8787
extraEnvVars:
8888
- name: KEYCLOAK_EXTRA_ARGS
8989
value: "--db-driver=software.amazon.jdbc.Driver --transaction-xa-enabled=false --log-level=INFO,software.amazon.jdbc:INFO"

keycloak-23/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ FROM docker.io/camunda/identity:latest@sha256:19ed5c6a1e2fde366092b5339023c86e66
99
# Building builder image
1010
# hadolint ignore=DL3006
1111
FROM ${BASE_IMAGE_NAME}@${BASE_IMAGE_DIGEST} AS builder
12-
# use the .github/scripts/utils/get_aws_wrapper_version.sh keycloak-version script to get the value and pass it at build time
13-
ARG AWS_JDBC_WRAPPER_VERSION
12+
13+
# renovate: datasource=github-tags depName=aws/aws-advanced-jdbc-wrapper
14+
ARG AWS_JDBC_WRAPPER_VERSION=2.3.9
1415

1516
USER 0
1617

@@ -54,8 +55,8 @@ FROM ${BASE_IMAGE_NAME}@${BASE_IMAGE_DIGEST}
5455
ARG BASE_IMAGE_NAME
5556
ARG BASE_IMAGE_DIGEST
5657

57-
# use the .github/scripts/utils/get_aws_wrapper_version.sh keycloak-version script to get the value and pass it at build time
58-
ARG AWS_JDBC_WRAPPER_VERSION
58+
# renovate: datasource=github-tags depName=aws/aws-advanced-jdbc-wrapper
59+
ARG AWS_JDBC_WRAPPER_VERSION=2.3.9
5960

6061
# Copy the previously built aws jdbc drivers
6162
COPY --from=builder /opt/bitnami/keycloak/ /opt/bitnami/keycloak/

keycloak-24/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ FROM docker.io/camunda/identity:latest@sha256:19ed5c6a1e2fde366092b5339023c86e66
99
# Building builder image
1010
# hadolint ignore=DL3006
1111
FROM ${BASE_IMAGE_NAME}@${BASE_IMAGE_DIGEST} AS builder
12-
# use the .github/scripts/utils/get_aws_wrapper_version.sh keycloak-version script to get the value and pass it at build time
13-
ARG AWS_JDBC_WRAPPER_VERSION
12+
13+
# renovate: datasource=github-tags depName=aws/aws-advanced-jdbc-wrapper
14+
ARG AWS_JDBC_WRAPPER_VERSION=2.3.9
1415

1516
USER 0
1617

@@ -54,8 +55,8 @@ FROM ${BASE_IMAGE_NAME}@${BASE_IMAGE_DIGEST}
5455
ARG BASE_IMAGE_NAME
5556
ARG BASE_IMAGE_DIGEST
5657

57-
# use the .github/scripts/utils/get_aws_wrapper_version.sh keycloak-version script to get the value and pass it at build time
58-
ARG AWS_JDBC_WRAPPER_VERSION
58+
# renovate: datasource=github-tags depName=aws/aws-advanced-jdbc-wrapper
59+
ARG AWS_JDBC_WRAPPER_VERSION=2.3.9
5960

6061
# Copy the previously built aws jdbc drivers
6162
COPY --from=builder /opt/bitnami/keycloak/ /opt/bitnami/keycloak/

keycloak-25/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ FROM docker.io/camunda/identity:latest@sha256:19ed5c6a1e2fde366092b5339023c86e66
99
# Building builder image
1010
# hadolint ignore=DL3006
1111
FROM ${BASE_IMAGE_NAME}@${BASE_IMAGE_DIGEST} AS builder
12-
# use the .github/scripts/utils/get_aws_wrapper_version.sh keycloak-version script to get the value and pass it at build time
13-
ARG AWS_JDBC_WRAPPER_VERSION
12+
13+
# renovate: datasource=github-tags depName=aws/aws-advanced-jdbc-wrapper
14+
ARG AWS_JDBC_WRAPPER_VERSION=2.3.9
1415

1516
USER 0
1617

@@ -54,8 +55,8 @@ FROM ${BASE_IMAGE_NAME}@${BASE_IMAGE_DIGEST}
5455
ARG BASE_IMAGE_NAME
5556
ARG BASE_IMAGE_DIGEST
5657

57-
# use the .github/scripts/utils/get_aws_wrapper_version.sh keycloak-version script to get the value and pass it at build time
58-
ARG AWS_JDBC_WRAPPER_VERSION
58+
# renovate: datasource=github-tags depName=aws/aws-advanced-jdbc-wrapper
59+
ARG AWS_JDBC_WRAPPER_VERSION=2.3.9
5960

6061
# Copy the previously built aws jdbc drivers
6162
COPY --chown=1001:1000 --from=builder /opt/bitnami/keycloak/ /opt/bitnami/keycloak/

keycloak-26/Dockerfile

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
ARG BASE_IMAGE_NAME="docker.io/bitnami/keycloak:26.0.0-debian-12-r1"
2+
# List of all available images with associated sha: https://hub.docker.com/r/bitnami/keycloak/tags
3+
# Note: use the global image digest to make this image platform agnostic (see: https://github.com/camunda/zeebe/pull/14186)
4+
ARG BASE_IMAGE_DIGEST="sha256:6aadcb7f1af5f463ccd8acaed341bead98d0c968532cd99f950512c74345818b"
5+
6+
# We use the identity image to copy the keycloak theme
7+
FROM docker.io/camunda/identity:latest@sha256:19ed5c6a1e2fde366092b5339023c86e66797f497f8efcac61c4de1ac254134b AS identity
8+
9+
# Building builder image
10+
# hadolint ignore=DL3006
11+
FROM ${BASE_IMAGE_NAME}@${BASE_IMAGE_DIGEST} AS builder
12+
13+
# renovate: datasource=github-tags depName=aws/aws-advanced-jdbc-wrapper
14+
ARG AWS_JDBC_WRAPPER_VERSION=2.3.9
15+
16+
USER 0
17+
18+
# install maven (silence alert about version pinning of maven)
19+
# hadolint ignore=DL3008
20+
RUN mkdir /home/keycloak && chown keycloak /home/keycloak && \
21+
apt-get update && apt-get install maven -y --no-install-recommends
22+
23+
COPY --from=identity /app/keycloak-theme/ /opt/bitnami/keycloak/themes/identity
24+
RUN chown 1001:1000 -R /opt/bitnami/keycloak/themes
25+
26+
USER 1001
27+
28+
WORKDIR /home/keycloak
29+
30+
# Install the custom providers
31+
# download the wrapper from github, then fetch the dependencies from maven
32+
RUN curl -fL "https://repo1.maven.org/maven2/software/amazon/jdbc/aws-advanced-jdbc-wrapper/${AWS_JDBC_WRAPPER_VERSION}/aws-advanced-jdbc-wrapper-${AWS_JDBC_WRAPPER_VERSION}.pom" \
33+
-o /home/keycloak/pom.xml \
34+
&& chown 1001:1000 /home/keycloak/pom.xml \
35+
&& chmod 0644 /home/keycloak/pom.xml && \
36+
37+
cat /home/keycloak/pom.xml && mvn install && \
38+
cp /home/keycloak/.m2/repository/software/amazon/*/*/*/*.jar /opt/bitnami/keycloak/providers/ && \
39+
40+
curl -fL "https://github.com/aws/aws-advanced-jdbc-wrapper/releases/download/${AWS_JDBC_WRAPPER_VERSION}/aws-advanced-jdbc-wrapper-${AWS_JDBC_WRAPPER_VERSION}.jar" \
41+
-o /opt/bitnami/keycloak/providers/aws-advanced-jdbc-wrapper-${AWS_JDBC_WRAPPER_VERSION}.jar \
42+
&& chown 1001:1000 /opt/bitnami/keycloak/providers/aws-advanced-jdbc-wrapper-${AWS_JDBC_WRAPPER_VERSION}.jar \
43+
&& chmod 0644 /opt/bitnami/keycloak/providers/aws-advanced-jdbc-wrapper-${AWS_JDBC_WRAPPER_VERSION}.jar && \
44+
45+
ls -alh /opt/bitnami/keycloak/providers/
46+
47+
48+
RUN /opt/bitnami/keycloak/bin/kc.sh build
49+
50+
##### FINAL Keycloak IMAGE # ####
51+
52+
# hadolint ignore=DL3006
53+
FROM ${BASE_IMAGE_NAME}@${BASE_IMAGE_DIGEST}
54+
# leave the values below unset to use the default value at the top of the file
55+
ARG BASE_IMAGE_NAME
56+
ARG BASE_IMAGE_DIGEST
57+
58+
# renovate: datasource=github-tags depName=aws/aws-advanced-jdbc-wrapper
59+
ARG AWS_JDBC_WRAPPER_VERSION=2.3.9
60+
61+
# Copy the previously built aws jdbc drivers
62+
COPY --chown=1001:1000 --from=builder /opt/bitnami/keycloak/ /opt/bitnami/keycloak/
63+
64+
COPY --chown=1001:1000 --from=builder /opt/bitnami/keycloak/themes/identity /opt/bitnami/keycloak/themes/identity
65+
66+
67+
# common, k8s, openshift and OCI labels:
68+
# OCI: https://github.com/opencontainers/image-spec/blob/main/annotations.md
69+
# OCP: https://docs.openshift.com/container-platform/4.10/openshift_images/create-images.html#defining-image-metadata
70+
LABEL maintainer="Camunda" \
71+
name="camunda/keycloak" \
72+
summary="Keycloak bitnami with AWS wrapper" \
73+
io.k8s.description="Keycloak bitnami with AWS wrapper." \
74+
io.k8s.display-name="keycloak" \
75+
description="Keycloak bitnami with AWS JDBC wrapper." \
76+
jdbc.aws-jdbc-wrapper.version="${AWS_JDBC_WRAPPER_VERSION}" \
77+
org.opencontainers.image.authors="Camunda" \
78+
org.opencontainers.image.vendor="Camunda" \
79+
org.opencontainers.image.documentation="https://hub.docker.com/camunda/keycloak/" \
80+
org.opencontainers.image.licenses="Apache License 2.0" \
81+
org.opencontainers.image.base.name="docker.io/library/${BASE_IMAGE_NAME}" \
82+
org.opencontainers.image.base.digest="${BASE_IMAGE_DIGEST}" \
83+
io.openshift.tags="bpmn,identity,keycloak,camunda,bitnami" \
84+
io.openshift.min-memory="1Gi" \
85+
io.openshift.min-cpu="1"
86+
87+
# cpu and ram allocation reference: https://www.keycloak.org/high-availability/concepts-memory-and-cpu-sizing
88+
89+
# the following labels are generated at buildtime - see https://github.com/docker/metadata-action
90+
# org.opencontainers.image.title
91+
# org.opencontainers.image.description
92+
# org.opencontainers.image.url
93+
# org.opencontainers.image.created
94+
# org.opencontainers.image.revision
95+
# org.opencontainers.image.source
96+
# org.opencontainers.image.version

0 commit comments

Comments
 (0)