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 fa5a73abc7727..3d6a39ebed2ab 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 @@ -110,6 +110,7 @@ ArtifactResultBuildItem nativeSourcesResult(NativeConfig nativeConfig, .setRunnerJarName(runnerJar.getFileName().toString()) // the path to native-image is not known now, it is only known at the time the native-sources will be consumed .setNativeImageName(nativeImageName) + .setContainerBuild(nativeConfig.isContainerBuild()) .build(); List command = nativeImageArgs.getArgs(); try (FileOutputStream commandFOS = new FileOutputStream(outputDir.resolve("native-image.args").toFile())) { @@ -201,6 +202,7 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa .setRunnerJarName(runnerJarName) .setNativeImageName(nativeImageName) .setNoPIE(noPIE) + .setContainerBuild(isContainerBuild) .setGraalVMVersion(graalVMVersion) .build(); @@ -474,6 +476,7 @@ static class Builder { private Path outputDir; private String runnerJarName; private String noPIE = ""; + private boolean isContainerBuild = false; private GraalVM.Version graalVMVersion = GraalVM.Version.UNVERSIONED; private String nativeImageName; private boolean classpathIsBroken; @@ -524,6 +527,11 @@ public Builder setNoPIE(String noPIE) { return this; } + public Builder setContainerBuild(boolean containerBuild) { + isContainerBuild = containerBuild; + return this; + } + public Builder setGraalVMVersion(GraalVM.Version graalVMVersion) { this.graalVMVersion = graalVMVersion; return this;