sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.6k stars 439 forks source link

GraalVMNativeImagePlugin build in docker container should relabel volume mount for target directory #1617

Open esamson opened 3 months ago

esamson commented 3 months ago

Expected behaviour

Following Docker Image Build Settings, sbt 'show GraalVMNativeImage/packageBin' should work on systems with SELinux enabled.

Actual behaviour

Error: Main entry point class 'foo.bar.Main' neither found on the classpath nor on the modulepath.

Suggestion

Adding the :Z suffix would allow this to work as expected. I think this behaves as a no-op for non-SELinux systems, but we could also make this a configurable setting (or detect the correct default somehow) to be safe.

Information