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
206 stars 88 forks source link

[Bug]: Gradle v7.5+ not working with UBI based Docker images #462

Closed ThoSap closed 8 months ago

ThoSap commented 8 months ago

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

eclipse-temurin:21.0.1_12-jdk-ubi9-minimal

Please add the version of Docker you are running

Docker version 24.0.7, build afdd53b

What happened?

Gradle v7.5+ builds with UBI based Eclipse Temurin Docker images fail with the following error, as findutils and therefore also xargs is not installed in the Docker image.

xargs is not available

The findutils utils are available in the Ubuntu and Alpine Linux based Docker images, there the Gradle builds do not fail.

See: https://stackoverflow.com/a/75660631/5666188 https://github.com/gradle/gradle/issues/19682 https://github.com/gradle/gradle/commit/0495e5e680da994442f124aa8b422d248d32049d

Please include findutils after the following line, so the command xargs is present as it is in the Ubuntu and Alpine Linux based Docker images:

        # Required for Gradle v7.5+ which requires the command xargs (included in findutils)
        findutils \

https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/docker_templates/ubi9-minimal.Dockerfile.j2#L20

https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/21/jre/ubi/ubi9-minimal/Dockerfile#L41 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/21/jdk/ubi/ubi9-minimal/Dockerfile#L41 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/20/jre/ubi/ubi9-minimal/Dockerfile.releases.full#L28 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/20/jdk/ubi/ubi9-minimal/Dockerfile.releases.full#L28 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/19/jre/ubi/ubi9-minimal/Dockerfile.releases.full#L28 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/19/jdk/ubi/ubi9-minimal/Dockerfile.releases.full#L28 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/17/jre/ubi/ubi9-minimal/Dockerfile#L41 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/17/jdk/ubi/ubi9-minimal/Dockerfile#L41 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/11/jre/ubi/ubi9-minimal/Dockerfile#L41 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/11/jdk/ubi/ubi9-minimal/Dockerfile#L41 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/8/jre/ubi/ubi9-minimal/Dockerfile#L41 https://github.com/adoptium/containers/blob/376294c245eba65108cee487ce209f39c15e84c8/8/jdk/ubi/ubi9-minimal/Dockerfile#L41

Relevant log output

./gradlew build

xargs is not available
karianna commented 8 months ago

Closing as per discussion in #463