From e1199cd0c71a97521ceb30c73eded1a2e01fa1ca Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Tue, 27 Sep 2022 22:44:09 +0300 Subject: [PATCH] Fix support for rootless docker context With the `'` it returns `'''unix:///run/user/1000/docker.sock'` which fails the startsWith("unix://") check. Fix up #26892 (cherry picked from commit 71a050140ef151dd05561784254ed164db237a0b) --- .../pkg/steps/NativeImageBuildLocalContainerRunner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildLocalContainerRunner.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildLocalContainerRunner.java index 1be0521d44027..58c97c1eb237c 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildLocalContainerRunner.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildLocalContainerRunner.java @@ -87,7 +87,7 @@ private static String fetchDockerEndpoint() { OutputFilter outputFilter = new OutputFilter(); if (!ExecUtil.execWithTimeout(new File("."), outputFilter, Duration.ofMillis(3000), "docker", "context", "ls", "--format", - "'{{- if .Current -}} {{- .DockerEndpoint -}} {{- end -}}'")) { + "{{- if .Current -}} {{- .DockerEndpoint -}} {{- end -}}")) { LOGGER.debug("Docker context lookup didn't succeed in time"); return null; }