Skip to content

Commit

Permalink
Store Alpine & Centos java preferences in ~/.java
Browse files Browse the repository at this point in the history
Pass java system properties to image using the JAVA_OPS environment variable, the same way the Unbuntu Dockerfile already does.

The directories were created earlier in the Dockerfile, but never set in the image.
  • Loading branch information
NCMEC-daavendasora committed Feb 9, 2023
1 parent 67d4ffd commit cfbcb7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dockerfiles/alpine/is/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ USER ${USER_ID}
WORKDIR ${USER_HOME}

# set environment variables
ENV WORKING_DIRECTORY=${USER_HOME} \
ENV JAVA_OPTS="-Djava.util.prefs.systemRoot=${USER_HOME}/.java -Djava.util.prefs.userRoot=${USER_HOME}" \
WORKING_DIRECTORY=${USER_HOME} \
WSO2_SERVER_HOME=${WSO2_SERVER_HOME}

# expose ports
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/centos/is/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ USER ${USER_ID}
WORKDIR ${USER_HOME}

# set environment variables
ENV WORKING_DIRECTORY=${USER_HOME} \
ENV JAVA_OPTS="-Djava.util.prefs.systemRoot=${USER_HOME}/.java -Djava.util.prefs.userRoot=${USER_HOME}" \
WORKING_DIRECTORY=${USER_HOME} \
WSO2_SERVER_HOME=${WSO2_SERVER_HOME}

# expose ports
Expand Down

0 comments on commit cfbcb7d

Please sign in to comment.