Skip to content

Commit

Permalink
[MOSIP-30473] Updated keycloak-init & keycloak-artemis (#70)
Browse files Browse the repository at this point in the history
* [MOSIP-30473] Updated keycloak-init & keycloak-artemis

[MOSIP-30473] Enabled captcha for keycloak login
[DSD-4243] Added feature to set up SMTP configuration
[MOSIP-31032] Fixed keycloak artemis build issue

Signed-off-by: syed salman <[email protected]>

* [MOSIP-30473] Fixed permission issue

Signed-off-by: syed salman <[email protected]>

* [MOSIP-30473] Fixed permission issue

Signed-off-by: syed salman <[email protected]>

* [MOSIP-30473] Fixed permission issue

Signed-off-by: syed salman <[email protected]>

* [MOSIP-30473] updated keycloak_init.py

Signed-off-by: syed salman <[email protected]>

---------

Signed-off-by: syed salman <[email protected]>
  • Loading branch information
syedsalman3753 authored Jan 22, 2024
1 parent 728fa73 commit c5be8d0
Show file tree
Hide file tree
Showing 4 changed files with 377 additions and 433 deletions.
46 changes: 14 additions & 32 deletions keycloak-artemis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM docker.io/bitnami/minideb:buster
FROM docker.io/bitnami/keycloak:16.1.1

USER root

ARG SOURCE
ARG COMMIT_HASH
Expand All @@ -9,26 +11,9 @@ LABEL commit_hash=${COMMIT_HASH}
LABEL commit_id=${COMMIT_ID}
LABEL build_time=${BUILD_TIME}

LABEL maintainer "Bitnami <[email protected]>"

ENV HOME="/" \
OS_ARCH="amd64" \
OS_FLAVOUR="debian-10" \
OS_NAME="linux"

ARG JAVA_EXTRA_SECURITY_DIR="/bitnami/java/extra-security"
LABEL maintainer="Bitnami <[email protected]>"

COPY prebuildfs /
RUN chmod +x /usr/sbin/install_packages
# Install required system packages and dependencies
RUN install_packages acl ca-certificates curl gzip libaio1 libc6 procps rsync tar zlib1g
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "wait-for-port" "1.0.1-10" --checksum 35c818ba3f4b5aae905959bc7d3a5e81fc63786e3c662b604612c0aa7fcda8fd
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "java" "11.0.14-7" --checksum 900545c4f346a0ece8abf2caf64fd9d4ab7514967d4614d716bf7362b24f828b
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "keycloak" "16.1.1-8" --checksum c432a2b3551a40e48b77f63257def52e9556c2b6ffa989e7eb6847ad87fdd9db
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.14.0-7" --checksum d6280b6f647a62bf6edc74dc8e526bfff63ddd8067dcb8540843f47203d9ccf1
RUN apt-get update && apt-get upgrade -y && \
rm -r /var/lib/apt/lists /var/cache/apt/archives
RUN chmod g+rwX /opt/bitnami

COPY ./theme/base /opt/bitnami/keycloak/themes/base

Expand All @@ -37,19 +22,16 @@ COPY ./theme/mosip /opt/bitnami/keycloak/themes/mosip
COPY ./standalone/deployments/* /opt/bitnami/keycloak/standalone/deployments

COPY rootfs /
RUN chmod +x /opt/bitnami/scripts/keycloak/postunpack.sh
RUN chmod +x /opt/bitnami/scripts/java/postunpack.sh

RUN /opt/bitnami/scripts/java/postunpack.sh
RUN /opt/bitnami/scripts/keycloak/postunpack.sh
ENV APP_VERSION="16.1.1" \
BITNAMI_APP_NAME="keycloak" \
JAVA_HOME="/opt/bitnami/java" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/java/bin:/opt/bitnami/keycloak/bin:$PATH"

RUN chmod +x /opt/bitnami/scripts/keycloak/entrypoint.sh
RUN chmod +x /opt/bitnami/scripts/keycloak/setup.sh
RUN chmod +x /opt/bitnami/scripts/keycloak/run.sh

RUN chmod +x /usr/sbin/install_packages && chmod g+rwX /opt/bitnami && \
chmod +x /opt/bitnami/scripts/keycloak/entrypoint.sh /opt/bitnami/scripts/keycloak/setup.sh /opt/bitnami/scripts/keycloak/run.sh && \
chown -R 1001:1001 /opt/*

# Install required system packages and dependencies
RUN . /usr/sbin/install_packages acl ca-certificates curl gzip libaio1 libc6 procps rsync tar zlib1g

USER 1001

ENTRYPOINT [ "/opt/bitnami/scripts/keycloak/entrypoint.sh" ]

CMD [ "/opt/bitnami/scripts/keycloak/run.sh" ]
10 changes: 5 additions & 5 deletions keycloak-init/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ USER ${container_user_uid}:${container_user_gid}
WORKDIR /home/${container_user}
COPY keycloak_init.py .

ENV KEYCLOAK_SERVER_URL=
ENV KEYCLOAK_ADMIN_USER=user
ENV KEYCLOAK_ADMIN_PASSWORD=
ENV KEYCLOAK_SERVER_URL=''
ENV KEYCLOAK_ADMIN_USER=''
ENV KEYCLOAK_ADMIN_PASSWORD=''
ENV INPUT_DIR=/opt/mosip/input
ENV INPUT_FILE=input.yaml
ENV FRONTEND_URL=
ENV FRONTEND_URL=''

CMD python3 keycloak_init.py $KEYCLOAK_SERVER_URL $KEYCLOAK_ADMIN_USER $KEYCLOAK_ADMIN_PASSWORD $INPUT_DIR/$INPUT_FILE --frontend_url $FRONTEND_URL
ENTRYPOINT ["/bin/bash", "-c", "python3 keycloak_init.py $KEYCLOAK_SERVER_URL $KEYCLOAK_ADMIN_USER $KEYCLOAK_ADMIN_PASSWORD $INPUT_DIR/$INPUT_FILE"]
Loading

0 comments on commit c5be8d0

Please sign in to comment.