Repository: quarkusio/quarkus
Issue: ~580 INFO messages from datasource dev service when no Docker available

### Describe the bug

I see ~580 INFO messages from datasource dev service when no Docker available and running latest Quarkus in dev mode.

Log messages are printed within 1 minute window, after that no new messages appear.

```
...
2021-10-19 13:58:22,820 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:22,922 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,024 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,126 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,227 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,330 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,433 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,536 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,639 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,742 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,846 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:23,950 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:24,053 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
2021-10-19 13:58:24,155 INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
...
```

### Expected behavior

One message about unavailable Docker could be enough.

Alternative solution could be less frequent logging, e.g. once per 5 or 10 seconds.

### Actual behavior

~580 INFO messages when no Docker available, printed within 1 minute window, after that no new messages appear.

`INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375`

### How to Reproduce?

 - Generate project with `quarkus-jdbc-postgresql`
 - Make sure no Docker / podman is running
 - run `mvn quarkus:dev`
 - Check the console output
 
Look for `INFO  [com.git.doc.zer.sha.org.apa.hc.cli.htt.imp.cla.HttpRequestRetryExec] (ducttape-1) Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375`

### Output of `uname -a` or `ver`

macOS BigSur

### Output of `java -version`

Java 11

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.3.0.Final / 999-SNAPSHOT

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
core/deployment/src/main/java/io/quarkus/deployment/console/StartupLogCompressor.java
core/deployment/src/main/java/io/quarkus/deployment/IsDockerWorking.java

diff --git a/core/deployment/src/main/java/io/quarkus/deployment/IsDockerWorking.java b/core/deployment/src/main/java/io/quarkus/deployment/IsDockerWorking.java
index 2f241e9b8f5..7c10c563dfa 100644
--- a/core/deployment/src/main/java/io/quarkus/deployment/IsDockerWorking.java
+++ b/core/deployment/src/main/java/io/quarkus/deployment/IsDockerWorking.java
@@ -71,7 +71,10 @@ private TestContainersStrategy(boolean silent) {
 
         @Override
         public Result get() {
-            StartupLogCompressor compressor = new StartupLogCompressor("Checking Docker Environment", Optional.empty(), null);
+            //testcontainers uses the Unreliables library to test if docker is started
+            //this runs in threads that start with 'ducttape'
+            StartupLogCompressor compressor = new StartupLogCompressor("Checking Docker Environment", Optional.empty(), null,
+                    (s) -> s.getName().startsWith("ducttape"));
             try {
                 Class<?> dockerClientFactoryClass = Thread.currentThread().getContextClassLoader()
                         .loadClass("org.testcontainers.DockerClientFactory");
diff --git a/core/deployment/src/main/java/io/quarkus/deployment/console/StartupLogCompressor.java b/core/deployment/src/main/java/io/quarkus/deployment/console/StartupLogCompressor.java
index 24d163e547c..75760253249 100644
--- a/core/deployment/src/main/java/io/quarkus/deployment/console/StartupLogCompressor.java
+++ b/core/deployment/src/main/java/io/quarkus/deployment/console/StartupLogCompressor.java
@@ -6,6 +6,7 @@
 import java.util.Optional;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.BiPredicate;
+import java.util.function.Predicate;
 
 import io.quarkus.deployment.dev.testing.MessageFormat;
 import io.quarkus.deployment.logging.LoggingSetupBuildItem;
@@ -24,10 +25,19 @@ public class StartupLogCompressor implements Closeable, BiPredicate<String, Bool
     final StatusLine sl;
     final List<String> toDump = new ArrayList<>();
     final AtomicInteger COUNTER = new AtomicInteger();
+    final Predicate<Thread> additionalThreadPredicate;
 
     public StartupLogCompressor(String name,
             @SuppressWarnings("unused") Optional<ConsoleInstalledBuildItem> consoleInstalledBuildItem,
             @SuppressWarnings("unused") LoggingSetupBuildItem loggingSetupBuildItem) {
+        this(name, consoleInstalledBuildItem, loggingSetupBuildItem, (s) -> false);
+    }
+
+    public StartupLogCompressor(String name,
+            @SuppressWarnings("unused") Optional<ConsoleInstalledBuildItem> consoleInstalledBuildItem,
+            @SuppressWarnings("unused") LoggingSetupBuildItem loggingSetupBuildItem,
+            Predicate<Thread> additionalThreadPredicate) {
+        this.additionalThreadPredicate = additionalThreadPredicate;
         if (QuarkusConsole.INSTANCE.isAnsiSupported()) {
             QuarkusConsole.installRedirects();
             this.name = name;
@@ -68,7 +78,8 @@ public boolean test(String s, Boolean errorStream) {
             //not installed
             return true;
         }
-        if (Thread.currentThread() == thread) {
+        Thread current = Thread.currentThread();
+        if (current == this.thread || additionalThreadPredicate.test(current)) {
             toDump.add(s);
             sl.setMessage(MessageFormat.BLUE + name + MessageFormat.RESET + " " + s.replace("\\n", ""));
             return false;