AdoptOpenJDK / openjdk-docker

Scripts for creating Docker images of OpenJDK binaries.
https://hub.docker.com/_/adoptopenjdk/
Apache License 2.0
426 stars 237 forks source link

Missing UBI Minimal Slim Images #339

Open james-crowley opened 4 years ago

james-crowley commented 4 years ago

With the script I am writing to help out #328, it identified a couple images that I expected to be up in DockerHub but are not.

{'adoptopenjdk/openjdk11-openj9:jdk11u-ubi-minimal-nightly-slim',
 'adoptopenjdk/openjdk11:jdk11u-ubi-minimal-nightly-slim',
 'adoptopenjdk/openjdk14-openj9:jdk14u-ubi-minimal-nightly-slim',
 'adoptopenjdk/openjdk14:jdk14u-ubi-minimal-nightly-slim',
 'adoptopenjdk/openjdk8-openj9:jdk8u-ubi-minimal-nightly-slim',
 'adoptopenjdk/openjdk8:jdk8u-ubi-minimal-nightly-slim'}

Looks like all the images are XXX-ubi-minimal-nightly-slim. @dinogun is there a reason why these are not being produced?

It seems like they should be built and publish on DockerHub.

james-crowley commented 4 years ago

@smlambert FYI, these images came from the script I am working on.

dinogun commented 4 years ago

@james-crowley this is intentional, ubi-minimal did not have the tools needed by the slim-script (stip, binutils) and so the config file skips the slim build for ubi-minimal alone

Build: releases nightly
Type: full slim
Architectures: aarch64 x86_64 ppc64le s390x
Directory: 8/jdk/ubi

Build: releases nightly
Type: full
Architectures: aarch64 x86_64 ppc64le s390x
Directory: 8/jdk/ubi-minimal
karianna commented 4 years ago

Should this be closed in that case?

james-crowley commented 4 years ago

@dinogun Could we not have the script install these tools, use them to run said script, then remove them?

Also on the slim builds I saw that the slim script and other files are left inside the container? I feel like these should be removed if we are trying to give users an option to use where space is a premium?

Here was the folder with the slim scripts/left overs:

root@774f91365596:/usr/local/bin# ls
slim-java_bin_del.list  slim-java_jmod_del.list  slim-java_lib_del.list  slim-java_rtjar_del.list  slim-java_rtjar_keep.list  slim-java.sh
srbala commented 3 years ago

We can apply #478, with use of some custom script like slim-java-ubi-mimimal.sh, and remove files and folders with simple rm commands

dinogun commented 3 years ago

@srbala PR's welcome. You can add checks in slim-java.sh for ubi-minimal and accordingly make changes.

srbala commented 3 years ago

@dinogun ubi-minimal now seems to have the binutils package. I am able to add to the package install list. Please check https://gist.github.com/srbala/3cd4323652e406eaa998f2074c0d1183. I have hand edited for verification/testing.

Seems available at amd64/x86_64. Is it not available in other arch environments?

srbala commented 3 years ago

Checked RedHat site, UBI/UBI-minimal available in following Archs https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8?architecture=arm64&tag=8.3-298.1618432845&push_date=1618946153000&container-tabs=gti

amd64 arm64 ppc64le s390x

dinogun commented 3 years ago

@srbala If you want to test the scripts on all the arches, you can open an issue at the openjdk-infrastructure and request temporary Non-privileged access to machines of the arch that you are looking for. That should help you to test your changes before submitting a PR.