Skip to content

Commit

Permalink
Use unsecure entropy source in docker packaging tests (#119598) (#119609
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mark-vieira authored Jan 6, 2025
1 parent 353cd26 commit 7652453
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
*/
public class DockerRun {

// Use less secure entropy source to avoid hanging when generating certificates
private static final String DEFAULT_JAVA_OPTS = "-Djava.security.egd=file:/dev/urandom";

private Distribution distribution;
private final Map<String, String> envVars = new HashMap<>();
private final Map<Path, Path> volumes = new HashMap<>();
Expand Down Expand Up @@ -112,6 +115,11 @@ String build() {
// Limit container memory
cmd.add("--memory " + memory);

// Add default java opts
for (String envVar : List.of("CLI_JAVA_OPTS", "ES_JAVA_OPTS")) {
this.envVars.put(envVar, this.envVars.getOrDefault(envVar, "") + " " + DEFAULT_JAVA_OPTS);
}

this.envVars.forEach((key, value) -> cmd.add("--env " + key + "=\"" + value + "\""));

// Map ports in the container to the host, so that we can send requests
Expand Down

0 comments on commit 7652453

Please sign in to comment.