diff --git a/core/src/main/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheck.java b/core/src/main/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheck.java index 43ed94bc84d..2013ddc4d9c 100644 --- a/core/src/main/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheck.java +++ b/core/src/main/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheck.java @@ -29,7 +29,7 @@ public Boolean call() { for (int internalPort : internalPorts) { command += " && "; command += " ("; - command += format("cat /proc/net/tcp{,6} | awk '{print $2}' | grep -i :%x", internalPort); + command += format("cat /proc/net/tcp* | awk '{print $2}' | grep -i :%x", internalPort); command += " || "; command += format("nc -vz -w 1 localhost %d", internalPort); command += " || "; diff --git a/core/src/test/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheckTest.java b/core/src/test/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheckTest.java index 71a14c3c79e..bee4f0a231a 100644 --- a/core/src/test/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheckTest.java +++ b/core/src/test/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheckTest.java @@ -11,8 +11,8 @@ public class InternalCommandPortListeningCheckTest { - // Linking a custom configuration into the container so that nginx is listening on port 8080. This is necessary to proof - // that the command formatting uses the correct casing for hexadecimal numberd (i.e. 1F90 and not 1f90). + // Linking a custom configuration into the container so that nginx is listening on port 8080. This is necessary to prove + // that the command formatting uses the correct casing for hexadecimal numbers (i.e. 1F90 and not 1f90). @Rule public GenericContainer nginx = new GenericContainer<>("nginx:1.9.4") .withClasspathResourceMapping("nginx_on_8080.conf", "/etc/nginx/conf.d/default.conf", BindMode.READ_ONLY);