Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop ':z' bind option when using MacOS and Podman #29850

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: will it work with Docker? I would expect it to fail on macOS in both cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will test it with MacOS and Docker, and report back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this with Quarkus 2.14.3 on another MacOS with Docker and it worked without any issues. So, this looks to be affecting only Podman.

Another machine details:
MacOS version: 12.6
Docker version: 20.10.12

selinuxBindOption = "";
}

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

Expand Down