Skip to content

Commit

Permalink
Pass container-runtime-options to native-image --version as well
Browse files Browse the repository at this point in the history
`quarkus.native.container-runtime-options` should be respected when
invoking the builder image to get its version.

Closes: #45842
  • Loading branch information
zakkak committed Jan 27, 2025
1 parent b4287d5 commit 726ba17
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,16 @@ private void pull(String effectiveBuilderImage, boolean processInheritIODisabled

@Override
protected String[] getGraalVMVersionCommand(List<String> args) {
return buildCommand("run", Collections.singletonList("--rm"), args);
List<String> containerRuntimeArgs;
if (nativeConfig.containerRuntimeOptions().isPresent()) {
List<String> runtimeOptions = nativeConfig.containerRuntimeOptions().get();
containerRuntimeArgs = new ArrayList<>(runtimeOptions.size() + 1);
containerRuntimeArgs.addAll(runtimeOptions);
containerRuntimeArgs.add("--rm");
} else {
containerRuntimeArgs = Collections.singletonList("--rm");
}
return buildCommand("run", containerRuntimeArgs, args);
}

@Override
Expand Down

0 comments on commit 726ba17

Please sign in to comment.