Skip to content

Commit

Permalink
[KEYCLOAK-10059] Use ubi8-minimal instead of base-jdk as base image
Browse files Browse the repository at this point in the history
  • Loading branch information
douglaspalmer authored and Bruno Oliveira da Silva committed Sep 30, 2019
1 parent 832dc9f commit 226d721
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jboss/base-jdk:8
FROM registry.redhat.io/ubi8-minimal

ENV KEYCLOAK_VERSION 6.0.1
ENV JDBC_POSTGRES_VERSION 42.2.5
Expand All @@ -17,7 +17,7 @@ ARG KEYCLOAK_DIST=https://downloads.jboss.org/keycloak/$KEYCLOAK_VERSION/keycloa

USER root

RUN yum update -y && yum install -y epel-release git && yum install -y jq openssl which && yum clean all
RUN microdnf update -y && microdnf install -y gzip hostname java-11-openjdk-headless openssl tar which && microdnf clean all

ADD tools /opt/jboss/tools
RUN /opt/jboss/tools/build-keycloak.sh
Expand Down
7 changes: 5 additions & 2 deletions server/tools/build-keycloak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ if [ "$GIT_REPO" != "" ]; then
GIT_BRANCH="master"
fi

# Install Git
microdnf install -y git

# Install Maven
cd /opt/jboss
curl -s https://apache.uib.no/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz | tar xz
Expand Down Expand Up @@ -88,5 +91,5 @@ rm -rf /opt/jboss/keycloak/standalone/configuration/standalone_xml_history
# Set permissions #
###################

chown -R jboss:0 /opt/jboss/keycloak
chmod -R g+rw /opt/jboss/keycloak
chgrp -R 0 /opt/jboss/keycloak
chmod -R g=u /opt/jboss/keycloak

0 comments on commit 226d721

Please sign in to comment.