quarkusio / quarkus-images

Set of container images delivered for Quarkus
Apache License 2.0
110 stars 73 forks source link

Add xargs to build images #274

Closed Sopka closed 3 weeks ago

Sopka commented 1 month ago

The gradle wrapper script forces you to have xargs installed.

See Gradle Issue 19682

In my case I cannot use the quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 to build a gradle project.

Including the findutils package would solve the issue...

.installer("microdnf")
                .user("root")
                .install("tar", "gzip", "gcc", "glibc-devel", "zlib-devel", "shadow-utils", "unzip", "gcc-c++", "findutils")
cescoffier commented 1 month ago

Thanks! Can you open a PR?

cescoffier commented 1 month ago

I'm actually wondering the image you are using. Builder images should not include Gradle. Only the s2i does.

Sopka commented 1 month ago

Pull request added: https://github.com/quarkusio/quarkus-images/pull/275

I do not need gradle in the builder image. The Java project's GIT repository includes the gradle wrapper script that downloads a fixed version of gradle during the build. See https://docs.gradle.org/current/userguide/gradle_wrapper.html

ThoSap commented 1 month ago

I always added the findutils package to my custom Dockerfile.multistage-native Dockerfile so Gradle works. This is a welcome change, as I no longer need to do that, thanks!

RUN microdnf install -y --setopt=install_weak_deps=0 findutils \
 && microdnf clean all -y \
 && [ ! -d /var/cache/yum ] || rm -rf /var/cache/yum
cescoffier commented 3 weeks ago

Fixed.