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

Version 4.3.0 removed the resources layer #938

Closed
tfkhim opened this issue Feb 5, 2024 · 1 comment · Fixed by #939
Closed

Version 4.3.0 removed the resources layer #938

tfkhim opened this issue Feb 5, 2024 · 1 comment · Fixed by #939
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@tfkhim
Copy link

tfkhim commented Feb 5, 2024

Expected Behavior

Hey 👋

first of all thank you for your work. Sadly we have an issue with the recent updated to version 4.3.0.

Until version 4.2.1 there was a separate resources layer in the Dockerfile. This layer is still mentioned in the latest guide:

The plugin creates a "layered" application in build/docker/main/layers and from that directory you can run java -jar myapp.jar. It works because that directory contains a lib directory with all the libraries and a resources directory with the configuration. Keep in mind that copying the only .jar file to another directory won’t work.

I would expect the resource layer to be still present or the guide to get updated with the recommended steps to create a container for an application that requires resource files.

Actual Behaviour

With the update to 4.3.0 this layer got removed by PR #903. With this update our application isn't able to run from the created Docker container, because the container doesn't contain the application.yml, logback.xml or Flyway migration scripts.

I couldn't find a migration guide or any hint how this case is supported with the new version.

Steps To Reproduce

No response

Environment Information

No response

Example Application

No response

Version

4.3.0

@melix
Copy link
Collaborator

melix commented Feb 5, 2024

This is a bug, the resources should be included in the jar file but they aren't.

@melix melix self-assigned this Feb 5, 2024
@melix melix added the type: bug Something isn't working label Feb 5, 2024
@melix melix added this to the 4.3.1 milestone Feb 5, 2024
melix added a commit that referenced this issue Feb 5, 2024
This layer is actually required for regular docker images (no optimized/AOT) since
the jars which are included are not the regular jars.

Fixes #938
@melix melix closed this as completed in #939 Feb 5, 2024
melix added a commit that referenced this issue Feb 5, 2024
This layer is actually required for regular docker images (no optimized/AOT) since
the jars which are included are not the regular jars.

Fixes #938
rorueda pushed a commit to rorueda/micronaut-gradle-plugin that referenced this issue Feb 6, 2024
This layer is actually required for regular docker images (no optimized/AOT) since
the jars which are included are not the regular jars.

Fixes micronaut-projects#938
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants