From a67f398574b4a22a866ba5923ed3c2fe0628d093 Mon Sep 17 00:00:00 2001 From: Rich Turner <7072278+richturner@users.noreply.github.com> Date: Wed, 5 Jan 2022 16:12:47 +0000 Subject: [PATCH] Updated to keycloak 16 --- Dockerfile | 17 +++++++++++++---- tools/build-keycloak.sh | 8 ++++---- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index d97e542..b14d661 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,18 @@ -FROM registry.access.redhat.com/ubi8-minimal +# ------------------------------------------------------------------------------------ +# Keycloak image built for aarch64 and also adds a custom provider for resolving +# themes that fallsback to the default openremote theme rather than just breaking. +# See this issue for aarch64 support: +# +# https://github.com/keycloak/keycloak-containers/issues/341 +# ------------------------------------------------------------------------------------ +FROM registry.access.redhat.com/ubi8/openjdk-11-runtime MAINTAINER support@openremote.io # Add git commit label must be specified at build time using --build-arg GIT_COMMIT=dadadadadad ARG GIT_COMMIT=unknown LABEL git-commit=$GIT_COMMIT -ENV KEYCLOAK_VERSION 13.0.1 +ENV KEYCLOAK_VERSION 16.0.0 ENV JDBC_POSTGRES_VERSION 42.2.5 ENV JDBC_MYSQL_VERSION 8.0.22 ENV JDBC_MARIADB_VERSION 2.5.4 @@ -34,7 +41,7 @@ ARG KEYCLOAK_DIST=https://github.com/keycloak/keycloak/releases/download/$KEYCLO USER root -RUN microdnf update -y && microdnf install -y glibc-langpack-en gzip hostname java-11-openjdk-headless openssl tar which && microdnf clean all +RUN microdnf update -y && microdnf install -y glibc-langpack-en gzip hostname openssl tar which && microdnf clean all ADD tools /opt/jboss/tools RUN chmod -R +x /opt/jboss/tools @@ -51,6 +58,8 @@ HEALTHCHECK --interval=3s --timeout=3s --start-period=30s --retries=30 CMD curl USER 1000 EXPOSE 8080 +EXPOSE 8443 + +ENTRYPOINT [ "/opt/jboss/tools/docker-entrypoint.sh" ] -ENTRYPOINT ["/opt/jboss/tools/docker-entrypoint.sh"] CMD ["-b", "0.0.0.0"] diff --git a/tools/build-keycloak.sh b/tools/build-keycloak.sh index 3bb9379..a3598c5 100644 --- a/tools/build-keycloak.sh +++ b/tools/build-keycloak.sh @@ -6,7 +6,7 @@ if [ "$GIT_REPO" != "" ]; then if [ "$GIT_BRANCH" == "" ]; then - GIT_BRANCH="master" + GIT_BRANCH="main" fi # Install Git @@ -24,8 +24,8 @@ if [ "$GIT_REPO" != "" ]; then # Build cd /opt/jboss/keycloak-source - MASTER_HEAD=`git log -n1 --format="%H"` - echo "Keycloak from [build]: $GIT_REPO/$GIT_BRANCH/commit/$MASTER_HEAD" + MAIN_HEAD=`git log -n1 --format="%H"` + echo "Keycloak from [build]: $GIT_REPO/$GIT_BRANCH/commit/$MAIN_HEAD" $M2_HOME/bin/mvn -Pdistribution -pl distribution/server-dist -am -Dmaven.test.skip clean install @@ -102,4 +102,4 @@ rm -rf /opt/jboss/keycloak/domain/tmp/auth echo "jboss:x:0:root" >> /etc/group echo "jboss:x:1000:0:JBoss user:/opt/jboss:/sbin/nologin" >> /etc/passwd chown -R jboss:root /opt/jboss -chmod -R g+rwX /opt/jboss +chmod -R g+rwX /opt/jboss \ No newline at end of file