Skip to content

Commit

Permalink
Updated to keycloak 16
Browse files Browse the repository at this point in the history
  • Loading branch information
richturner committed Jan 5, 2022
1 parent e58f49a commit a67f398
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"]
8 changes: 4 additions & 4 deletions tools/build-keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

if [ "$GIT_REPO" != "" ]; then
if [ "$GIT_BRANCH" == "" ]; then
GIT_BRANCH="master"
GIT_BRANCH="main"
fi

# Install Git
Expand All @@ -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

Expand Down Expand Up @@ -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

0 comments on commit a67f398

Please sign in to comment.