Skip to content

chore(deps): update openjdk docker tag to v11 - autoclosed #13379

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

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dataflow/snippets/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
FROM python:3.12-slim

# Install JRE
COPY --from=openjdk:8-jre-slim /usr/local/openjdk-8 /usr/local/openjdk-8
COPY --from=openjdk:11.0.16-jre-slim /usr/local/openjdk-8 /usr/local/openjdk-8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

There are a couple of concerns with this line:

  1. (Critical) Is /usr/local/openjdk-8 the correct source path for JRE 11 files within the openjdk:11.0.16-jre-slim image? The JAVA_HOME (and thus the typical installation path) for openjdk:11.0.16-jre-slim is /usr/local/openjdk-11. If /usr/local/openjdk-8 does not exist or does not contain the JRE in the source image, this COPY command will fail to install Java correctly, potentially leading to runtime errors for applications depending on JRE.

  2. (Medium) Using /usr/local/openjdk-8 as the destination path for Java 11 is misleading and harms maintainability. It would be clearer to use a path that reflects the actual Java version being installed, such as /usr/local/openjdk-11.

If the destination path is updated to /usr/local/openjdk-11, please also ensure that JAVA_HOME on line 25 and the path in the update-alternatives command on line 26 are updated accordingly to /usr/local/openjdk-11 for consistency. (These lines are not part of the current diff, so they would need to be changed separately.)

I suggest updating this line to use the correct source path for Java 11 and a version-appropriate destination path.

COPY --from=openjdk:11.0.16-jre-slim /usr/local/openjdk-11 /usr/local/openjdk-11

ENV JAVA_HOME /usr/local/openjdk-8
RUN update-alternatives --install /usr/bin/java java /usr/local/openjdk-8/bin/java 10

Expand Down