-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix AppCDS generation when using podman #38644
Conversation
We use the same trick as used in native-image building Fixes: quarkusio#38616
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but this is the third place we use this, so perhaps it's worth extracting it in a method and reusing it.
quarkus/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/UpxCompressionBuildStep.java
Lines 128 to 136 in f75790f
String uid = getLinuxID("-ur"); String gid = getLinuxID("-gr"); if (uid != null && gid != null && !uid.isEmpty() && !gid.isEmpty()) { Collections.addAll(commandLine, "--user", uid + ":" + gid); if (containerRuntime.isPodman() && containerRuntime.isRootless()) { // Needed to avoid AccessDeniedExceptions commandLine.add("--userns=keep-id"); } } Lines 25 to 37 in 0af4d6a
if (containerRuntime.isDocker() && containerRuntime.isRootless()) { Collections.addAll(containerRuntimeArgs, "--user", String.valueOf(0)); } else { String uid = getLinuxID("-ur"); String gid = getLinuxID("-gr"); if (uid != null && gid != null && !uid.isEmpty() && !gid.isEmpty()) { Collections.addAll(containerRuntimeArgs, "--user", uid + ":" + gid); if (containerRuntime.isPodman() && containerRuntime.isRootless()) { // Needed to avoid AccessDeniedExceptions containerRuntimeArgs.add("--userns=keep-id"); } } }
I am also wondering whether we would need to include the WSL work around as well:
if (containerRuntime.isInWindowsWSL()) {
containerRuntimeArgs.add("--interactive");
}
Where would you put it? |
There is |
Seems like a reasonable follow-up task |
Status for workflow
|
We use the same trick as used in native-image
building