Skip to content

Commit

Permalink
Merge pull request #6 from entando/ENG-4291_properly-set-the-home-in-…
Browse files Browse the repository at this point in the history
…the-base-image-of-the-CM

ENG-4291 properly set the home in the base image of the CM
  • Loading branch information
entgigi authored Nov 11, 2022
2 parents 7ac40b4 + 814b550 commit 17b634e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6
ARG JAVA_PACKAGE=java-11-openjdk-headless-1:11.0.16.1.1-1.el8_6.x86_64
ARG JAVA_PACKAGE=java-11-openjdk-headless-1:11.0.17.0.8-2.el8_6.x86_64
ARG RUN_JAVA_VERSION=1.3.8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' \
HOME=/deployments
# Install java and the run-java script
# Also set up permissions for user `1001`
RUN microdnf install openssl curl ca-certificates ${JAVA_PACKAGE} \
Expand All @@ -31,5 +32,11 @@ RUN microdnf install openssl curl ca-certificates ${JAVA_PACKAGE} \
&& echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security
# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size.
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"

RUN microdnf install shadow-utils \
&& useradd -u 1001 -r -g 0 -d /deployments -s /sbin/nologin -c "Default Application User" java-run \
&& microdnf remove shadow-utils \
&& microdnf clean all
WORKDIR /deployments
USER 1001
ENTRYPOINT [ "/deployments/run-java.sh" ]
2 changes: 1 addition & 1 deletion entando-project
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ENTANDO_PRJ_NAME=entando-java-base
ENTANDO_PRJ_IMAGE_REGISTRY="registry.hub.docker.com"
ENTANDO_PRJ_IMAGE_NAME=entando-java-base
ENTANDO_PRJ_VERSION=11.0.1
ENTANDO_PRJ_VERSION=11.0.2
ENTANDO_PRJ_BUILD_COMMAND=.ent/enp-build.sh
ENTANDO_PRJ_BUILD_DIR_PATH=out
ENTANDO_PRJ_IMAGE_PUBLICATION_COMMAND=.ent/enp-publish.sh
Expand Down

0 comments on commit 17b634e

Please sign in to comment.