The /elasticsearch/bin/elasticsearch script in the container contains this text:-
# Optionally, exact memory values can be set using the `ES_JAVA_OPTS`.
# Note that the Xms and Xmx lines in the JVM options file must be
# commented out. Sample format include "512m", and "10g".
Supplying -Xmx and -Xms in ES_JAVA_OPTS when the lines are still in the $ES_HOME/config/jvm.options causes the -Xmx and -Xms settings to be specified twice on the process command line. I'm not certain what effect this has, but it's clearly not desirable!
There seemed to be three ways to fix this:-
Use sed to patch the $ES_HOME/config/jvm.options file to remove those lines
Supply my own edited version of that file and copy it in over the default using the Dockerfile
Put my own jvm.options file in a different location and set $ES_JVM_OPTIONS to point to it
In the end I went for the second option, and copied the jvm.options out of the ES package and then commented out the offending lines.
The
/elasticsearch/bin/elasticsearch
script in the container contains this text:-Supplying
-Xmx
and-Xms
inES_JAVA_OPTS
when the lines are still in the$ES_HOME/config/jvm.options
causes the-Xmx
and-Xms
settings to be specified twice on the process command line. I'm not certain what effect this has, but it's clearly not desirable!There seemed to be three ways to fix this:-
$ES_HOME/config/jvm.options
file to remove those linesjvm.options
file in a different location and set$ES_JVM_OPTIONS
to point to itIn the end I went for the second option, and copied the
jvm.options
out of the ES package and then commented out the offending lines.