Skip to content

Commit

Permalink
IT-515: First version of keycloak custom image
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeniosant committed Jan 25, 2024
1 parent 4f18ff3 commit 3e7c878
Show file tree
Hide file tree
Showing 54 changed files with 8 additions and 6,073 deletions.
2 changes: 1 addition & 1 deletion .ent/enp-build-key.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

TMP="$(cat Dockerfile.keycloak Dockerfile.redhat-sso | sha256sum --zero | cut -d' ' -f1)"
TMP="$(cat Dockerfile.keycloak | sha256sum --zero | cut -d' ' -f1)"
TMP+="${PPL_COMMIT_ID}_${ENTANDO_PRJ_VERSION}"
echo "$TMP"
42 changes: 7 additions & 35 deletions Dockerfile.keycloak
Original file line number Diff line number Diff line change
@@ -1,39 +1,11 @@
FROM quay.io/keycloak/keycloak:18.0.2-legacy
LABEL MAINTAINER="Entando <[email protected]>"
ARG VERSION
LABEL name="Entando Keycloak" \
vendor="Entando" \
version="v${VERSION}" \
release="7" \
summary="Keycloak with Entando's themes and extensions." \
description="This is container hosts Keycloak along with themes created for Entando."
COPY LICENSE /licences/entando-lgpl.txt
FROM quay.io/keycloak/keycloak:23.0.3 as builder

COPY themes /opt/jboss/keycloak/themes
COPY --chown=jboss:root cli /opt/jboss/tools/cli/
COPY --chown=jboss:root jboss-tools/standalone-configuration.cli /opt/jboss/tools/cli/standalone-configuration.cli
COPY --chown=jboss:root jboss-tools/standalone-ha-configuration.cli /opt/jboss/tools/cli/standalone-ha-configuration.cli
RUN /opt/keycloak/bin/kc.sh build

ARG ORACLE_JDBC_DRIVER_VERSION=23.2.0.0
RUN export KEYCLOAK_HTTP_PORT=8080 && \
cd /opt/jboss/keycloak/modules/system/layers/base/com/oracle/jdbc/main/ && \
mkdir driver && \
curl https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/${ORACLE_JDBC_DRIVER_VERSION}/ojdbc8-${ORACLE_JDBC_DRIVER_VERSION}.jar -o driver/ojdbc.jar
FROM quay.io/keycloak/keycloak:23.0.3
#COPY themes/entando /opt/keycloak/themes/entando
COPY --from=builder /opt/keycloak/ /opt/keycloak/

ENV KEYCLOAK_DEFAULT_THEME="entando" \
KEYCLOAK_HOME="/opt/jboss/keycloak" \
HOME="/home/jboss"

ENV JGROUPS_DISCOVERY_PROTOCOL="dns.DNS_PING" \
JGROUPS_DISCOVERY_PROPERTIES="dns_query=keycloak-headless" \
CACHE_OWNERS_COUNT="2" \
CACHE_OWNERS_AUTH_SESSIONS_COUNT="2"
#ENV KC_SPI_THEME_DEFAULT="entando"

USER root
RUN mkdir -p "$HOME"; \
chown jboss:jboss "$HOME"; \
chmod g+rwx "$HOME"
USER jboss

EXPOSE 8080
CMD ["-b", "0.0.0.0"]
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
26 changes: 0 additions & 26 deletions Dockerfile.redhat-sso

This file was deleted.

12 changes: 0 additions & 12 deletions cli/databases/oracle/change-database.cli

This file was deleted.

25 changes: 0 additions & 25 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,3 @@ services:
#DB_DATABASE: keycloak
#DB_USER: username
#DB_PASSWORD: password

redhat-sso:
build:
context: ./
dockerfile: Dockerfile.redhat-sso
hostname: redhat-sso
ports:
- "8081:8080"
environment:
SSO_ADMIN_USERNAME: admin
SSO_ADMIN_PASSWORD: qwe123
PROXY_ADDRESS_FORWARDING: "true"

# Configure a different database (default is H2)
#DB_SERVICE_PREFIX_MAPPING: db-postgresql=DB
#DB_POSTGRESQL_SERVICE_HOST: "db-host"
#DB_POSTGRESQL_SERVICE_PORT: 5432
#DB_VENDOR: postgres
#DB_DATABASE: postgresql
#DB_USERNAME: username
#DB_PASSWORD: password

# Addional configuration needed by Oracle database
#DB_URL: jdbc:oracle:thin:@db-host:1521:XE
#DB_NONXA: "true"
7 changes: 0 additions & 7 deletions jboss-tools/standalone-configuration.cli

This file was deleted.

7 changes: 0 additions & 7 deletions jboss-tools/standalone-ha-configuration.cli

This file was deleted.

Loading

0 comments on commit 3e7c878

Please sign in to comment.