Skip to content

Commit

Permalink
introduce javaSecurity variable in template (fabric8io-images#160)
Browse files Browse the repository at this point in the history
because the directory of the java.security file has
moved in Java 11, so we need it to be flexible.
  • Loading branch information
vorburger committed Nov 7, 2018
1 parent 14c97d5 commit 628e6f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions java/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ config:
from: "fedora:29"
user: "jboss"
home: "/opt/jboss"
javaSecurity: "/usr/lib/jvm/java/jre/lib/security/java.security"
description: "Fedora S2I Java builder image with OpenJDK 8"
version:
javaMajor: "1.8.0"
Expand All @@ -24,6 +25,7 @@ config:
from: "centos:7.5.1804"
user: "jboss"
home: "/opt/jboss"
javaSecurity: "/usr/lib/jvm/java/jre/lib/security/java.security"
description: "CentOS S2I Java builder image with OpenJDK 8"
version:
javaMajor: "1.8.0"
Expand All @@ -37,6 +39,7 @@ config:
from: "jboss/openjdk18-rhel7:1.1-7"
user: "jboss"
home: "/home/jboss"
javaSecurity: "/usr/lib/jvm/java/jre/lib/security/java.security"
description: "RHEL S2I Java builder image with OpenJDK 8"
# Re-enable when productised version of jolokia is available
# mavenRepo: "https://maven.repository.redhat.com/ga"
Expand Down
2 changes: 1 addition & 1 deletion java/templates/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ENV JAVA_HOME /etc/alternatives/jre
{{?}}

# Use /dev/urandom to speed up startups & Add jboss user to the root group
RUN echo securerandom.source=file:/dev/urandom >> /usr/lib/jvm/java/jre/lib/security/java.security \
RUN echo securerandom.source=file:/dev/urandom >> {{= fp.config.base.javaSecurity }} \
&& usermod -g root -G jboss jboss

{{=
Expand Down

0 comments on commit 628e6f3

Please sign in to comment.