-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore(deps): update eclipse-temurin docker tag to v21.0.9_10-jdk-alpine #368
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| FROM eclipse-temurin:21.0.7_6-jdk-alpine | ||
| FROM eclipse-temurin:21.0.9_10-jdk-alpine | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the gradle example, I've noticed a mismatch between the build and runtime JDK versions. The build environment in For improved build reproducibility and security, I've also updated this line to pin the base image by its digest ( |
||
| ARG JAR_FILE=JAR_FILE_MUST_BE_SPECIFIED_AS_BUILD_ARG | ||
| COPY ${JAR_FILE} app.jar | ||
| ENTRYPOINT ["java", "-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.
While updating the JDK version is a good practice, I've noticed that the build environment defined in
gradle-example/cloudbuild.yamluses JDK 17 (gradle:8-jdk17), whereas this Dockerfile specifies a JDK 21 runtime. Using different major JDK versions for build and runtime can lead to subtle compatibility issues and prevents you from using newer language features. It's highly recommended to align the JDK versions across your build and runtime environments.For more deterministic and secure builds, I've updated this line to pin the base image using its digest (
@sha256:...) instead of a mutable tag. This ensures you're always using the exact same base image.