-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Create Dockerfile #499
Create Dockerfile #499
Conversation
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.
Should we add some readme about how to use this dockerfile?
|
||
ENTRYPOINT [ | ||
"java", \ | ||
"--add-opens=java.base/sun.nio.hb=ALL-UNNAMED", \ |
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.
can you add a comment explain why we want these flags?
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.
It's necessary to added this flag to run spark on java >= 17.
Sorry, I forgot to send the link
USER appuser | ||
|
||
# Copy the executable from the "package" stage. | ||
COPY --from=package build/target/app.jar ./app.jar |
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.
Does this mean that only the jar will be included in the final image and not all the classes? I have not used a multi-stage build before.
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.
Yep, exactly!
Yes, that's how I am using, but you probably should deploy the image somewhere. I could create a PR with a workflow to publish on github container register, if you agree.
|
@guitcastro can you update the README with this as an option for building and running? I am imagining users that are not setup with java locally could benefit from this. I will check where we can publish the images, we are currently doing our first release as part of the incubator program |
@the-other-tim-brown Right, I will update the Readme! |
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.
@guitcastro can you squash this down to a single commit for me after adding the license? Our current setup doesn't allow us to do squash and merge from GitHub so just need things to be a single, cleaned up commit before I merge it
@@ -0,0 +1,42 @@ | |||
# syntax=docker/dockerfile:1 |
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.
You'll need to add the apache license in the comments here to make CI pass
added apache license
Continue on #506 |
What is the purpose of the pull request
Create a docker file to run the project
Brief change log
Verify this pull request
This pull request is a trivial rework / code cleanup without any test coverage.