From 97e26a2f2b5bab182c4fe26d053a5a2eaf6b134c Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Sun, 27 Oct 2019 11:37:46 +0530 Subject: [PATCH] Don't add the "--rm" option to "docker run" command, of native-image, too early --- .../io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java index b559b52dc487d..c06f33e9f4473 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java @@ -82,7 +82,7 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa // E.g. "/usr/bin/docker run -v {{PROJECT_DIR}}:/project --rm quarkus/graalvm-native-image" nativeImage = new ArrayList<>(); Collections.addAll(nativeImage, nativeConfig.containerRuntime, "run", "-v", - outputDir.toAbsolutePath() + ":/project:z", "--rm"); + outputDir.toAbsolutePath() + ":/project:z"); if (IS_LINUX) { if ("docker".equals(nativeConfig.containerRuntime)) { @@ -101,7 +101,7 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa // publish the debug port onto the host if asked for nativeImage.add("--publish=" + DEBUG_BUILD_PROCESS_PORT + ":" + DEBUG_BUILD_PROCESS_PORT); } - nativeImage.add(nativeConfig.builderImage); + Collections.addAll(nativeImage, "--rm", nativeConfig.builderImage); } else { if (IS_LINUX) { noPIE = detectNoPIE();