From 2c70555a3e60b8f42aa155b1e4110bad8a2a2d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Wed, 31 May 2023 17:57:58 +0200 Subject: [PATCH] Fail fast when `docker pull` fails for the native builder image --- .../deployment/pkg/steps/NativeImageBuildContainerRunner.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java index 3d4377272d885..2fdaab44f36d3 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java @@ -88,7 +88,9 @@ public void setup(boolean processInheritIODisabled) { final ProcessBuilder pb = new ProcessBuilder( Arrays.asList(containerRuntime.getExecutableName(), "pull", effectiveBuilderImage)); pullProcess = ProcessUtil.launchProcess(pb, processInheritIODisabled); - pullProcess.waitFor(); + if (pullProcess.waitFor() != 0) { + throw new RuntimeException("Failed to pull builder image '" + effectiveBuilderImage + "'"); + } } catch (IOException | InterruptedException e) { throw new RuntimeException("Failed to pull builder image '" + effectiveBuilderImage + "'", e); } finally {