Skip to content

Commit

Permalink
Java 11 build
Browse files Browse the repository at this point in the history
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
  • Loading branch information
skabashnyuk committed Apr 18, 2020
1 parent eb9a2ab commit 443ad66
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion assembly/assembly-che-tomcat8/src/assembly/bin/setenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@
[ -z "${CHE_LOCAL_CONF_DIR}" ] && CHE_LOCAL_CONF_DIR="${CATALINA_HOME}/conf/"

#Global JAVA options
[ -z "${JAVA_OPTS}" ] && JAVA_OPTS="-Xms256m -Xmx2048m -Djava.security.egd=file:/dev/./urandom"
[ -z "${JAVA_OPTS}" ] && JAVA_OPTS="-XX:MinRAMPercentage=60.0 -XX:MaxRAMPercentage=90.0 -Djava.security.egd=file:/dev/./urandom"
# Check compatible JAVA_OPTS
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2 | cut -d'.' -f1 | sed 's/[^0-9]*//g')
if ([ "$JAVA_VERSION" -ge 11 ])
then
echo "Incompatible JAVA_OPTS configured to use with Java 11. Reset to default"
echo $JAVA_OPTS
JAVA_OPTS="-XX:MinRAMPercentage=60.0 -XX:MaxRAMPercentage=90.0 -Djava.security.egd=file:/dev/./urandom"
else
echo "Sorry. Not found."
fi

#Global LOGS DIR
[ -z "${CHE_LOGS_DIR}" ] && CHE_LOGS_DIR="$CATALINA_HOME/logs"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/che/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: EPL-2.0
#
FROM openjdk:8u242-jre-slim
FROM openjdk:11-jre-slim
ENV LANG=C.UTF-8
RUN echo "%root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && rm -rf /tmp/*
EXPOSE 8000 8080
Expand Down

0 comments on commit 443ad66

Please sign in to comment.