-
Notifications
You must be signed in to change notification settings - Fork 1.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
native-image execution within a dev container - fails with security error #3522
Comments
Hi, thank you for reporting this. Unfortunately I could not reproduce this issue. I used the |
Thank you for testing it out @oubidar-Abderrahim - could there be a difference that I am running on a MacBook Pro and use Docker 3.3.0?. The test is correct, certainly, a simple app. |
I was also able to create the native-image inside the container on top of macOS |
What is the output of |
Version: 3.3.0 |
That is the same docker version I'm using, I will describe the steps I took to reproduce and compare them to what you do
|
I tried to be as detailed as possible on the steps, I tested this on both Linux Ubuntu 18.04 and macOS Catalina 10.15.7 Could you please try again by following these steps |
Thank you for the detailed steps @oubidar-Abderrahim , this is what I did. Same result:
The only option I could see is deleting Docker altogether and reinstalling, or updating to the new(er) 3.5.1 Exception in thread "main" java.lang.ExceptionInInitializerError |
If the issue is still occurring on the latest build 22.1.0, please reopen this issue. |
Local env:
OpenJDK Runtime Environment GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05)
OpenJDK 64-Bit Server VM GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05, mixed mode, sharing)
Running a dev container:
https://github.com/spring-projects-experimental/spring-native/blob/main/run-dev-container.sh
Executing native-image is successful on MacBook with 21.1 installed is fine
Error occurs when running in container:
native-image fails with a security error as listed below:
Code:
`import java.lang.reflect.InvocationTargetException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
public class Helloworkshop {
private static final String USER_HOME = System.getProperty("user.home");
}
`
The text was updated successfully, but these errors were encountered: