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

use multistage build dockerfiles for JDK24+ #676

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gdams
Copy link
Member

@gdams gdams commented Oct 22, 2024

fixes: #675

This will mean that for JDK24+ we stop shipping container images with build time dependencies in them (e.g wget, curl, gnupg etc)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

A block has been put on this Pull Request as this repository is temporarily under a code freeze due to an ongoing release cycle.

If this pull request needs to be merged during the release cycle then please comment /merge and a PMC member will be able to remove the block.

If the code freeze is over you can remove this block by commenting /thaw.

@karianna
Copy link
Contributor

We wouldn't backport this because... we'd be removing tools?

@gdams
Copy link
Member Author

gdams commented Oct 23, 2024

We wouldn't backport this because... we'd be removing tools?

correct, it would be a breaking change so it's best to only change this going forwards

@karianna
Copy link
Contributor

We wouldn't backport this because... we'd be removing tools?

correct, it would be a breaking change so it's best to only change this going forwards

We'll need to advertise this strongly then (blogs etc)

@tianon
Copy link

tianon commented Oct 25, 2024

If the tools shouldn't be in the final images, I'd suggest instead moving the installation to the RUN instruction where they are used and cleaning them up/removing after use (before the RUN line ends).

See https://github.com/docker-library/cassandra/blob/1e3d5732f34ceb9e77870d0be9501515f917cc60/5.0/Dockerfile#L40-L54 for a pretty straightforward/compressed example of what I mean (but I'm happy to provide a more detailed example if helpful, maybe in the form of a diff against the current Dockerfile here; for Alpine-based images this is even more straightforward thanks to their support for --virtual on apk add to group package installs in a way that makes them trivial to remove afterwards).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Temurin images contain packages only used at container build time
3 participants