Skip to content

Commit

Permalink
Merge pull request #34805 from zakkak/2023-07-13-fix-34725
Browse files Browse the repository at this point in the history
Fix container builds when explicitly setting `container-runtime`
  • Loading branch information
zakkak authored Jul 19, 2023
2 parents e0bcf74 + e2d6b36 commit e3f85a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class NativeImageBuildContainerRunner extends NativeImageBuildRu

protected NativeImageBuildContainerRunner(NativeConfig nativeConfig) {
this.nativeConfig = nativeConfig;
containerRuntime = nativeConfig.containerRuntime().orElseGet(ContainerRuntimeUtil::detectContainerRuntime);
containerRuntime = ContainerRuntimeUtil.detectContainerRuntime();

this.baseContainerRuntimeArgs = new String[] { "--env", "LANG=C", "--rm" };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ private boolean runUpxInContainer(NativeImageBuildItem nativeImage, NativeConfig
List<String> extraArgs = nativeConfig.compression().additionalArgs().orElse(Collections.emptyList());

List<String> commandLine = new ArrayList<>();
ContainerRuntimeUtil.ContainerRuntime containerRuntime = nativeConfig.containerRuntime()
.orElseGet(ContainerRuntimeUtil::detectContainerRuntime);
ContainerRuntimeUtil.ContainerRuntime containerRuntime = ContainerRuntimeUtil.detectContainerRuntime();
commandLine.add(containerRuntime.getExecutableName());

commandLine.add("run");
Expand Down

0 comments on commit e3f85a1

Please sign in to comment.