From 6e468bc36a359f3e59c0e8a761cde1e4ff128d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Wed, 27 Mar 2024 17:54:12 +0100 Subject: [PATCH] fix: testcontainers socket override checks --- internal/core/docker_host.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/core/docker_host.go b/internal/core/docker_host.go index 8d976b4526..b873d4d6de 100644 --- a/internal/core/docker_host.go +++ b/internal/core/docker_host.go @@ -148,7 +148,11 @@ func extractDockerSocketFromClient(ctx context.Context, cli client.APIClient) st testcontainersDockerSocket, err := dockerSocketOverridePath(ctx) if err == nil { - return checkDefaultDockerSocket(ctx, cli, testcontainersDockerSocket) + if strings.HasPrefix(testcontainersDockerSocket, TCPSchema) { + return checkDefaultDockerSocket(ctx, cli, testcontainersDockerSocket) + } + + return strings.Replace(testcontainersDockerSocket, DockerSocketSchema, "", 1) } dockerHost := extractDockerHost(ctx)