Skip to content

Commit

Permalink
Drop ':z' bind option when using MacOS and Podman
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjanashish committed Dec 14, 2022
1 parent ab59738 commit 2954a9f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,14 @@ protected List<String> getContainerRuntimeBuildArgs() {
volumeOutputPath = FileUtil.translateToVolumePath(volumeOutputPath);
}

String selinuxBindOption = ":z";
if (SystemUtils.IS_OS_MAC
&& ContainerRuntimeUtil.detectContainerRuntime() == ContainerRuntimeUtil.ContainerRuntime.PODMAN) {
selinuxBindOption = "";
}

Collections.addAll(containerRuntimeArgs, "-v",
volumeOutputPath + ":" + NativeImageBuildStep.CONTAINER_BUILD_VOLUME_PATH + ":z");
volumeOutputPath + ":" + NativeImageBuildStep.CONTAINER_BUILD_VOLUME_PATH + selinuxBindOption);
return containerRuntimeArgs;
}

Expand Down

0 comments on commit 2954a9f

Please sign in to comment.