From 79b1ff8c8300cedbbc38795043dde04f3f46c03b Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:03:28 +0200 Subject: [PATCH 01/16] Update ci-rootless.yml --- .github/workflows/ci-rootless.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index e752747b804..de548ee2897 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -17,6 +17,8 @@ jobs: run: curl -fsSL https://get.docker.com/rootless | sh - name: start rootless Docker run: PATH=$HOME/bin:$PATH XDG_RUNTIME_DIR=/tmp/docker-$(id -u) dockerd-rootless.sh --experimental --storage-driver vfs & + - name: verify the installation + run: PATH=$HOME/bin:$PATH XDG_RUNTIME_DIR=/tmp/docker-$(id -u) DOCKER_HOST=/tmp/docker-$(id -u)/docker.sock docker info || ls -la $XDG_RUNTIME_DIR - name: Build with Gradle run: XDG_RUNTIME_DIR=/tmp/docker-$(id -u) ./gradlew --no-daemon --scan testcontainers:test - name: aggregate test reports with ciMate From 34bc48401c76e562baac07fed8535fea6838268f Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:05:41 +0200 Subject: [PATCH 02/16] Update ci-rootless.yml --- .github/workflows/ci-rootless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index de548ee2897..036fef75382 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -18,7 +18,7 @@ jobs: - name: start rootless Docker run: PATH=$HOME/bin:$PATH XDG_RUNTIME_DIR=/tmp/docker-$(id -u) dockerd-rootless.sh --experimental --storage-driver vfs & - name: verify the installation - run: PATH=$HOME/bin:$PATH XDG_RUNTIME_DIR=/tmp/docker-$(id -u) DOCKER_HOST=/tmp/docker-$(id -u)/docker.sock docker info || ls -la $XDG_RUNTIME_DIR + run: PATH=$HOME/bin:$PATH XDG_RUNTIME_DIR=/tmp/docker-$(id -u) DOCKER_HOST=/tmp/docker-$(id -u)/docker.sock docker info || ls -la /tmp/docker-$(id -u) - name: Build with Gradle run: XDG_RUNTIME_DIR=/tmp/docker-$(id -u) ./gradlew --no-daemon --scan testcontainers:test - name: aggregate test reports with ciMate From d2aaa4d0f259ce276693104672fa3b34b9c0170e Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:13:44 +0200 Subject: [PATCH 03/16] Update ci-rootless.yml --- .github/workflows/ci-rootless.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index 036fef75382..5914a1fee51 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -7,6 +7,8 @@ on: jobs: test: runs-on: ubuntu-18.04 + env: + XDG_RUNTIME_DIR: /tmp/docker-testcontainers/ steps: - uses: actions/checkout@v2 - name: debug @@ -16,11 +18,13 @@ jobs: - name: install rootless Docker run: curl -fsSL https://get.docker.com/rootless | sh - name: start rootless Docker - run: PATH=$HOME/bin:$PATH XDG_RUNTIME_DIR=/tmp/docker-$(id -u) dockerd-rootless.sh --experimental --storage-driver vfs & + run: | + mkdir -p $XDG_RUNTIME_DIR + PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & - name: verify the installation - run: PATH=$HOME/bin:$PATH XDG_RUNTIME_DIR=/tmp/docker-$(id -u) DOCKER_HOST=/tmp/docker-$(id -u)/docker.sock docker info || ls -la /tmp/docker-$(id -u) + run: PATH=$HOME/bin:$PATH DOCKER_HOST=$XDG_RUNTIME_DIR/docker.sock docker info || ls -la /tmp/docker-$(id -u) - name: Build with Gradle - run: XDG_RUNTIME_DIR=/tmp/docker-$(id -u) ./gradlew --no-daemon --scan testcontainers:test + run: ./gradlew --no-daemon --scan testcontainers:test - name: aggregate test reports with ciMate if: always() continue-on-error: true From 59b8799346cfbfaebe5a28a02fac2ef400543777 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:15:20 +0200 Subject: [PATCH 04/16] Update ci-rootless.yml --- .github/workflows/ci-rootless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index 5914a1fee51..bc9466e2ed5 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -22,7 +22,7 @@ jobs: mkdir -p $XDG_RUNTIME_DIR PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & - name: verify the installation - run: PATH=$HOME/bin:$PATH DOCKER_HOST=$XDG_RUNTIME_DIR/docker.sock docker info || ls -la /tmp/docker-$(id -u) + run: PATH=$HOME/bin:$PATH DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR - name: Build with Gradle run: ./gradlew --no-daemon --scan testcontainers:test - name: aggregate test reports with ciMate From 79ccc78a2f229c78c7c6abeec34e254412f8691d Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:20:05 +0200 Subject: [PATCH 05/16] Update ci-rootless.yml --- .github/workflows/ci-rootless.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index bc9466e2ed5..e63403c8b54 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -16,11 +16,11 @@ jobs: - name: uninstall rootful Docker run: sudo apt-get -q -y --purge remove moby-engine moby-buildx && sudo rm -rf /var/run/docker.sock - name: install rootless Docker - run: curl -fsSL https://get.docker.com/rootless | sh - - name: start rootless Docker run: | mkdir -p $XDG_RUNTIME_DIR - PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & + curl -fsSL https://get.docker.com/rootless | sh + - name: start rootless Docker + run: PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & - name: verify the installation run: PATH=$HOME/bin:$PATH DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR - name: Build with Gradle From 426defc123bbe7c440e73177d87fe96144ddfe57 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:32:19 +0200 Subject: [PATCH 06/16] Test implicit XDG_RUNTIME_DIR --- .github/workflows/ci-rootless.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index e63403c8b54..0b9ee38ce8d 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -7,6 +7,12 @@ on: jobs: test: runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + include: + - { } + - { XDG_RUNTIME_DIR: "/tmp/docker-testcontainers/" } env: XDG_RUNTIME_DIR: /tmp/docker-testcontainers/ steps: @@ -17,12 +23,11 @@ jobs: run: sudo apt-get -q -y --purge remove moby-engine moby-buildx && sudo rm -rf /var/run/docker.sock - name: install rootless Docker run: | - mkdir -p $XDG_RUNTIME_DIR - curl -fsSL https://get.docker.com/rootless | sh - - name: start rootless Docker - run: PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & - - name: verify the installation - run: PATH=$HOME/bin:$PATH DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR + mkdir -p $XDG_RUNTIME_DIR || true + $(curl -fsSL https://get.docker.com/rootless | sh) + PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & + sleep 1 + DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR - name: Build with Gradle run: ./gradlew --no-daemon --scan testcontainers:test - name: aggregate test reports with ciMate From d238c96c24a5176183e083c180bd92229f4f8994 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:33:34 +0200 Subject: [PATCH 07/16] provide dummy value --- .github/workflows/ci-rootless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index 0b9ee38ce8d..dd6987893cf 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: include: - - { } + - { XDG_RUNTIME_DIR: "" } - { XDG_RUNTIME_DIR: "/tmp/docker-testcontainers/" } env: XDG_RUNTIME_DIR: /tmp/docker-testcontainers/ From 315e6d92ea2806f20a1152ce4fe4ea918ccdec52 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:35:18 +0200 Subject: [PATCH 08/16] fix the init logic --- .github/workflows/ci-rootless.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index dd6987893cf..514dbc5f6e3 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -24,7 +24,8 @@ jobs: - name: install rootless Docker run: | mkdir -p $XDG_RUNTIME_DIR || true - $(curl -fsSL https://get.docker.com/rootless | sh) + curl -fsSL https://get.docker.com/rootless | sh > init.sh + sh ./init.sh PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & sleep 1 DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR From 904cd7c62d6625e8a0f61e19de1ec1ecc8bec9ee Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:36:57 +0200 Subject: [PATCH 09/16] remove env section --- .github/workflows/ci-rootless.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index 514dbc5f6e3..58187124eab 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -13,8 +13,6 @@ jobs: include: - { XDG_RUNTIME_DIR: "" } - { XDG_RUNTIME_DIR: "/tmp/docker-testcontainers/" } - env: - XDG_RUNTIME_DIR: /tmp/docker-testcontainers/ steps: - uses: actions/checkout@v2 - name: debug From d5a4d4ce3a7d96d33678cb63754389c7e6da9488 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:41:09 +0200 Subject: [PATCH 10/16] set env vars from matrix vars --- .github/workflows/ci-rootless.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index 58187124eab..e7f191b761e 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -13,6 +13,8 @@ jobs: include: - { XDG_RUNTIME_DIR: "" } - { XDG_RUNTIME_DIR: "/tmp/docker-testcontainers/" } + env: + XDG_RUNTIME_DIR: ${{ matrix.XDG_RUNTIME_DIR }} steps: - uses: actions/checkout@v2 - name: debug @@ -23,7 +25,7 @@ jobs: run: | mkdir -p $XDG_RUNTIME_DIR || true curl -fsSL https://get.docker.com/rootless | sh > init.sh - sh ./init.sh + $(sh ./init.sh) PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & sleep 1 DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR @@ -34,7 +36,7 @@ jobs: continue-on-error: true env: CIMATE_PROJECT_ID: 2348n4vl - CIMATE_CI_KEY: "CI / rootless Docker" + CIMATE_CI_KEY: "CI / rootless Docker (${{ matrix.XDG_RUNTIME_DIR }})" run: | wget -q https://get.cimate.io/release/linux/cimate chmod +x cimate From 6c0decc897081c8ea2bb40025ca4c6c02c206a15 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:43:43 +0200 Subject: [PATCH 11/16] fix the init logic (again :D) --- .github/workflows/ci-rootless.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index e7f191b761e..0d31ab3aac7 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -25,7 +25,8 @@ jobs: run: | mkdir -p $XDG_RUNTIME_DIR || true curl -fsSL https://get.docker.com/rootless | sh > init.sh - $(sh ./init.sh) + cat init.sh + . ./init.sh PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & sleep 1 DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR From 660a8c95f6dfab68e9cf9c61bb39cc27a3f77a9c Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:46:37 +0200 Subject: [PATCH 12/16] fix the export command --- .github/workflows/ci-rootless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index 0d31ab3aac7..6b58c7ae4a9 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -24,7 +24,7 @@ jobs: - name: install rootless Docker run: | mkdir -p $XDG_RUNTIME_DIR || true - curl -fsSL https://get.docker.com/rootless | sh > init.sh + curl -fsSL https://get.docker.com/rootless | sh | grep '^EXPORT' > init.sh cat init.sh . ./init.sh PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & From caab74929ae1b0b516a5f420f02814d6617f9fa7 Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:55:12 +0200 Subject: [PATCH 13/16] fix grep pattern --- .github/workflows/ci-rootless.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index 6b58c7ae4a9..e2193dde8ff 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -24,9 +24,9 @@ jobs: - name: install rootless Docker run: | mkdir -p $XDG_RUNTIME_DIR || true - curl -fsSL https://get.docker.com/rootless | sh | grep '^EXPORT' > init.sh + curl -fsSL https://get.docker.com/rootless | sh | grep '^export' > init.sh cat init.sh - . ./init.sh + source ./init.sh PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & sleep 1 DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR From c1c58882c65c472575f645a6ea39b606b4681edc Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 15:56:56 +0200 Subject: [PATCH 14/16] remove grep from the get script --- .github/workflows/ci-rootless.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-rootless.yml b/.github/workflows/ci-rootless.yml index e2193dde8ff..7dacc2767a5 100644 --- a/.github/workflows/ci-rootless.yml +++ b/.github/workflows/ci-rootless.yml @@ -24,9 +24,9 @@ jobs: - name: install rootless Docker run: | mkdir -p $XDG_RUNTIME_DIR || true - curl -fsSL https://get.docker.com/rootless | sh | grep '^export' > init.sh + curl -fsSL https://get.docker.com/rootless | sh > init.sh cat init.sh - source ./init.sh + source <(grep '^export' init.sh) PATH=$HOME/bin:$PATH dockerd-rootless.sh --experimental --storage-driver vfs & sleep 1 DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock docker info || ls -la $XDG_RUNTIME_DIR From da3bd7cea749ee59d01c9725fa9584129dd5b87f Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 16:00:28 +0200 Subject: [PATCH 15/16] Add some logging --- .../dockerclient/RootlessDockerClientProviderStrategy.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java b/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java index cc6b23e506d..68456a39ca3 100644 --- a/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java +++ b/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java @@ -2,6 +2,8 @@ import com.sun.jna.Library; import com.sun.jna.Native; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.SystemUtils; import java.net.URI; @@ -14,14 +16,16 @@ * @deprecated this class is used by the SPI and should not be used directly */ @Deprecated +@Slf4j public final class RootlessDockerClientProviderStrategy extends DockerClientProviderStrategy { public static final int PRIORITY = UnixSocketClientProviderStrategy.PRIORITY + 1; private Path getSocketPath() { String xdgRuntimeDir = System.getenv("XDG_RUNTIME_DIR"); - if (xdgRuntimeDir == null) { + if (StringUtils.isBlank(xdgRuntimeDir)) { xdgRuntimeDir = "/run/user/" + LibC.INSTANCE.getuid(); + log.debug("$XDG_RUNTIME_DIR is not set. Falling back to {}", xdgRuntimeDir); } return Paths.get(xdgRuntimeDir).resolve("docker.sock"); } From d46fe61016a9b38358634ec788967898cc9d351a Mon Sep 17 00:00:00 2001 From: Sergei Egorov Date: Mon, 27 Jul 2020 16:26:06 +0200 Subject: [PATCH 16/16] support home path --- .../RootlessDockerClientProviderStrategy.java | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java b/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java index 68456a39ca3..3ee58f4910a 100644 --- a/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java +++ b/core/src/main/java/org/testcontainers/dockerclient/RootlessDockerClientProviderStrategy.java @@ -2,14 +2,17 @@ import com.sun.jna.Library; import com.sun.jna.Native; +import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.SystemUtils; +import org.jetbrains.annotations.Nullable; import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.Optional; /** * @@ -21,13 +24,50 @@ public final class RootlessDockerClientProviderStrategy extends DockerClientProv public static final int PRIORITY = UnixSocketClientProviderStrategy.PRIORITY + 1; - private Path getSocketPath() { + @Getter(lazy = true) + @Nullable + private final Path socketPath = resolveSocketPath(); + + private Path resolveSocketPath() { + return tryEnv().orElseGet(() -> { + Path homePath = Paths.get(System.getProperty("user.home")).resolve(".docker").resolve("run"); + return tryFolder(homePath).orElseGet(() -> { + Path implicitPath = Paths.get("/run/user/" + LibC.INSTANCE.getuid()); + return tryFolder(implicitPath).orElse(null); + }); + }); + } + + private Optional tryEnv() { String xdgRuntimeDir = System.getenv("XDG_RUNTIME_DIR"); if (StringUtils.isBlank(xdgRuntimeDir)) { - xdgRuntimeDir = "/run/user/" + LibC.INSTANCE.getuid(); - log.debug("$XDG_RUNTIME_DIR is not set. Falling back to {}", xdgRuntimeDir); + log.debug("$XDG_RUNTIME_DIR is not set."); + return Optional.empty(); + } + Path path = Paths.get(xdgRuntimeDir); + if (!Files.exists(path)) { + log.debug("$XDG_RUNTIME_DIR is set to '{}' but the folder does not exist.", path); + return Optional.empty(); + } + Path socketPath = path.resolve("docker.sock"); + if (!Files.exists(socketPath)) { + log.debug("$XDG_RUNTIME_DIR is set but '{}' does not exist.", socketPath); + return Optional.empty(); + } + return Optional.of(socketPath); + } + + private Optional tryFolder(Path path) { + if (!Files.exists(path)) { + log.debug("'{}' does not exist.", path); + return Optional.empty(); + } + Path socketPath = path.resolve("docker.sock"); + if (!Files.exists(socketPath)) { + log.debug("'{}' does not exist.", socketPath); + return Optional.empty(); } - return Paths.get(xdgRuntimeDir).resolve("docker.sock"); + return Optional.of(socketPath); } @Override @@ -39,7 +79,7 @@ public TransportConfig getTransportConfig() throws InvalidConfigurationException @Override protected boolean isApplicable() { - return SystemUtils.IS_OS_LINUX && Files.exists(getSocketPath()); + return SystemUtils.IS_OS_LINUX && getSocketPath() != null && Files.exists(getSocketPath()); } @Override