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

Update OpenJDK latest Docker image to use Java 21 #6189

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Nov 20, 2023

PR description

Switched base image to ubuntu:rolling, that follow any stable Ubuntu release, currently 23.10) since OpenJDK Java 21 is not available on latest LTS Ubuntu.

Copy link

github-actions bot commented Nov 20, 2023

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

@fab-10 fab-10 marked this pull request as ready for review November 20, 2023 11:45
@fab-10 fab-10 changed the title Update Docker OpenJDK latest image to use Java 21 Update OpenJDK latest Docker image to use Java 21 Nov 20, 2023
ARG VERSION="dev"

RUN apt-get update && \
apt-get install --no-install-recommends -q --assume-yes openjdk-19-jre-headless=19* libjemalloc-dev=5.* && \
apt-get install --no-install-recommends -q --assume-yes openjdk-21-jre-headless libjemalloc-dev adduser && \
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious, what triggered the need for adduser ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is no more present in the base image

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@@ -1,9 +1,9 @@

FROM ubuntu:22.04
FROM ubuntu:rolling
Copy link
Contributor

Choose a reason for hiding this comment

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

This will make reproducible builds difficult.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you suggest to use for the base image?

Copy link
Contributor

Choose a reason for hiding this comment

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

A fixed version such as what was specified, 22.04. Rolling and latest can change to latter distro versions whereas a major/minor will only contain security fixes. Perfect reproducability would involve the exact version. But I'm just going for "doesn't break when ubuntu upgrades"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fine for me, will set this to 23.10, was using rolling to automatically switch to a supported version, but that could actually breaks the build, like it happened now with the missing adduser

Copy link
Contributor

Choose a reason for hiding this comment

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

I think i can accept that tradeoff for only this build profile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shemnon @jflo are you fine with the current implementation?

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 enabled auto-merge (squash) November 20, 2023 17:55
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 merged commit 6dea9a0 into hyperledger:main Nov 21, 2023
@fab-10 fab-10 deleted the latest-java-21 branch November 22, 2023 07:50
jflo pushed a commit to jflo/besu that referenced this pull request Dec 4, 2023
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
jflo pushed a commit to jflo/besu that referenced this pull request Dec 4, 2023
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
jflo pushed a commit to jflo/besu that referenced this pull request Dec 4, 2023
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
gfukushima pushed a commit to gfukushima/besu that referenced this pull request Dec 15, 2023
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants