diff --git a/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java b/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java index 9c78677c135..a032c2b324d 100644 --- a/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java +++ b/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java @@ -34,15 +34,8 @@ private Path resolveSocketPath() { Path homePath = Paths.get(System.getProperty("user.home")).resolve(".docker").resolve("run"); return tryFolder(homePath) .orElseGet(() -> { - Path dockerDesktopPath = Paths - .get(System.getProperty("user.home")) - .resolve(".docker") - .resolve("desktop"); - return tryFolder(dockerDesktopPath) - .orElseGet(() -> { - Path implicitPath = Paths.get("/run/user/" + LibC.INSTANCE.getuid()); - return tryFolder(implicitPath).orElse(null); - }); + Path implicitPath = Paths.get("/run/user/" + LibC.INSTANCE.getuid()); + return tryFolder(implicitPath).orElse(null); }); }); } @@ -86,11 +79,7 @@ public TransportConfig getTransportConfig() throws InvalidConfigurationException @Override protected boolean isApplicable() { - return ( - (SystemUtils.IS_OS_LINUX || SystemUtils.IS_OS_MAC) && - getSocketPath() != null && - Files.exists(getSocketPath()) - ); + return SystemUtils.IS_OS_LINUX && getSocketPath() != null && Files.exists(getSocketPath()); } @Override