profile
viewpoint

Ask questionsProvide ubi-minimal with java installed

Description The current standard Quarkus JVM Dockerfile (as of provided by code.quarkus.io) is based on the registry.access.redhat.com/ubi8/ubi-minimal:8.1 image. Since this image does not include java and an updated microdnf, it always takes quite a while to build the first layers of this image. This is especially true for our CI builds, as they don't always have the previous layers cached (mutliple machines) and thus we have longer build times than needed.

Therefore, I would like to propose to provide something like a ubi-minimal-java:8.1-java11 or even a ubi-minimal-quarkus:8.1-quarkus1.5.2 image that includes everything of the standard JVM Dockerfile up until the actual application libraries are copied into the container.

Implementation ideas Automatically build a regularly updated version with the main part of the standard quarkus jvm Dockerfile (see below) and publish it on a docker repository.

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'

# Install java and the run-java script
# Also set up permissions for user `1001`
RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \
    && microdnf update \
    && microdnf clean all \
    && mkdir /deployments \
    && chown 1001 /deployments \
    && chmod "g+rwX" /deployments \
    && chown 1001:root /deployments \
    && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \
    && chown 1001 /deployments/run-java.sh \
    && chmod 540 /deployments/run-java.sh \
    && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security

# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size.
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
quarkusio/quarkus

Answer questions tqvarnst

I will follow-up with the OpenJDK team to see what the status of a UBI-minimal-java image provided and maintained by Red Hat is.

useful!

Related questions

Warning message about com.sun.xml.bind:jaxb-osgi:jar:2.2.10 when executing: mvnw compile quarkus:dev:
Quarkus Swagger UI behind an Ingress Controller - quarkus hot 4
MP rest client interface cannot be used as a CDI injected client and REST endpoint hot 2
MyBatis extension hot 2
quarkus-hibernate-orm extension is breaking native-image generation hot 1
error on ssl handshake with database in native image mode hot 1
RESTEasy does not return the ErrorMessage when JSON is expected from the client hot 1
Native Image SSL Problem hot 1
Upgrade Quarkus from 0.18.0 to 0.19.1 hot 1
Wrong behavior in Using JWT RBAC guide hot 1
Unable to invoke own Serializer/Deserializer within Kafka in native compiled program hot 1
Support OpenJDK S2I hot 1
Smallrye JWT isn't compatible with native image hot 1
EntityManager doesn't work for quarkus scheduler hot 1
java.lang.IllegalStateException: This method is normally automatically..... in IT tests hot 1
source:https://uonfu.com/
Github User Rank List