From 1d103212906ebc65ed39739867ec4e60d2f96306 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 --- .../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 1be0521d44027b..58c97c1eb237c3 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; }