-
Notifications
You must be signed in to change notification settings - Fork 142
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
Upgrade Spring example enabling the musl support #143
Comments
I was able to compile a Spring Boot application with I am refactoring the docker file for it, because it requires a special folder for tomcat to avoid the following error:
The issue was fixed but I am reviewing some ways to have the Docker file more elegant. The configuration at <plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<buildArgs>
<buildArg>--static</buildArg>
<buildArg>--libc=musl</buildArg>
</buildArgs>
</configuration>
</plugin> Results:
|
Fixed Docker image |
Hi @fniephaus, @olyagpl I propose to decouple the example about Spring Boot for native compilation in 2 folders:
Why I am thinking to add an additional folder? In order to not puzzle the developer. <plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<buildArgs>
<buildArg>--static</buildArg>
<buildArg>--libc=musl</buildArg>
</buildArgs>
</configuration>
</plugin> But if you compile a spring boot application manual, you need it. In the other hand, I believe that But manually, it is possible. If you like the idea, I will send a PR in coming days with both examples refactored and organised Waiting for your feedback :) Juan Antonio |
Hi @jabrena, thanks for the suggestions. Since this repo focuses on GraalVM demos, I think it's good that we show the direct solution (what you called "manual" solution). We, however, neither maintain nor provide support for these buildpacks, which is why I'd be inclined not to include demos for them in this repo. We can, of course, mention buildpacks and link to corresponding resources somewhere in the docs of the demo. |
Oki, I agree with your approach. |
with current sources, everything is fine. |
Hi,
I was reviewing the repo, it is amazing but some techniques like static compilation with
musl
was not applied to the spring example.From my side, I upgraded the example to spring-boot 3 RC1 with success and it is possible to compile in static but I was not able to enable the option for musl.
Did you try it?
Test in local:
If you like, I could send a PR with current changes.
Many thanks in advance.
Juan Antonio
The text was updated successfully, but these errors were encountered: