Skip to content

Commit

Permalink
Merge pull request #4897 from jaikiran/fix-native-image-options
Browse files Browse the repository at this point in the history
Don't add the "--rm" option to "docker run" command, of native-image, too early
  • Loading branch information
geoand authored Oct 27, 2019
2 parents 41376b1 + 97e26a2 commit 69ade9d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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();
Expand Down

0 comments on commit 69ade9d

Please sign in to comment.