adoptium / containers

Repo containing the dockerfiles and scripts to produce the official eclipse-temurin containers.
https://hub.docker.com/_/eclipse-temurin/
Apache License 2.0
224 stars 97 forks source link

[Bug]: Temurin images contain packages only used at container build time #675

Open jerboaa opened 1 month ago

jerboaa commented 1 month ago

Please add the exact image (with tag) that you are using

eclipse-temurin:jdk-17 (any Temurin container, really)

Please add the version of Docker you are running

Any

What happened?

The images contain build-only tools such as tar, wget and with #673 gpg, which are all just used at image build time to a) fetch the tarball, b) do some verification c) extract the tarball

It would be better to extract those dependencies into a builder container and build the container and then use COPY --from <BUILDER_CONTAINER>. Then the JDK container would have fewer dependencies (and only dependencies of the JDK).

gdams commented 1 month ago

Totally agree, I was discussing this with @tellison earlier, my proposal is to switch to a multistage build process for JDK24+

jerboaa commented 1 month ago

Yes.