File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
qa/packaging/src/test/java/org/elasticsearch/packaging/util/docker Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 2929 */
3030public class DockerRun {
3131
32+ // Use less secure entropy source to avoid hanging when generating certificates
33+ private static final String DEFAULT_JAVA_OPTS = "-Djava.security.egd=file:/dev/urandom" ;
34+
3235 private Distribution distribution ;
3336 private final Map <String , String > envVars = new HashMap <>();
3437 private final Map <Path , Path > volumes = new HashMap <>();
@@ -112,6 +115,11 @@ String build() {
112115 // Limit container memory
113116 cmd .add ("--memory " + memory );
114117
118+ // Add default java opts
119+ for (String envVar : List .of ("CLI_JAVA_OPTS" , "ES_JAVA_OPTS" )) {
120+ this .envVars .put (envVar , this .envVars .getOrDefault (envVar , "" ) + " " + DEFAULT_JAVA_OPTS );
121+ }
122+
115123 this .envVars .forEach ((key , value ) -> cmd .add ("--env " + key + "=\" " + value + "\" " ));
116124
117125 // Map ports in the container to the host, so that we can send requests
You can’t perform that action at this time.
0 commit comments