diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java index 15eb300febff0..d826c15c68113 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java @@ -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" }; diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/UpxCompressionBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/UpxCompressionBuildStep.java index c58500f1be332..c9275a0c79b7d 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/UpxCompressionBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/UpxCompressionBuildStep.java @@ -104,8 +104,7 @@ private boolean runUpxInContainer(NativeImageBuildItem nativeImage, NativeConfig List extraArgs = nativeConfig.compression().additionalArgs().orElse(Collections.emptyList()); List commandLine = new ArrayList<>(); - ContainerRuntimeUtil.ContainerRuntime containerRuntime = nativeConfig.containerRuntime() - .orElseGet(ContainerRuntimeUtil::detectContainerRuntime); + ContainerRuntimeUtil.ContainerRuntime containerRuntime = ContainerRuntimeUtil.detectContainerRuntime(); commandLine.add(containerRuntime.getExecutableName()); commandLine.add("run");