Skip to content

Commit

Permalink
Merge pull request #1302 from dinogun/bump_package_versions
Browse files Browse the repository at this point in the history
Update OS, JVM and maven versions
  • Loading branch information
dinogun authored Sep 26, 2024
2 parents 69b7562 + 49296b9 commit 442eeda
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Dockerfile.autotune
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
##########################################################
# Build Docker Image
##########################################################
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10 as mvnbuild-jdk17
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4 as mvnbuild-jdk21
ARG USER=autotune
ARG AUTOTUNE_HOME=/home/$USER

RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y java-17-openjdk-devel \
&& microdnf install tar gzip java-17-openjdk-jmods binutils git vim \
RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y java-21-openjdk-devel \
tar gzip java-21-openjdk-jmods binutils git vim \
&& microdnf clean all

RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
&& curl -fsSL -o /tmp/apache-maven.tar.gz https://apache.osuosl.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz \
&& curl -fsSL -o /tmp/apache-maven.tar.gz https://apache.osuosl.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz \
&& tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
&& rm -f /tmp/apache-maven.tar.gz \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
Expand All @@ -48,7 +48,7 @@ RUN jlink --strip-debug --compress 2 --no-header-files --no-man-pages --module-p
# Runtime Docker Image
##########################################################
# Use ubi-minimal as the base image
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4

ARG AUTOTUNE_VERSION
ARG USER=autotune
Expand All @@ -58,8 +58,8 @@ ARG AUTOTUNE_HOME=/home/$USER
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

# Install packages needed for Java to function correctly
RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig \
glibc-langpack-en gzip tar \
RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y tzdata openssl ca-certificates fontconfig \
glibc-langpack-en gzip tar \
&& microdnf update -y \
&& microdnf clean all

Expand All @@ -85,9 +85,9 @@ RUN microdnf -y install shadow-utils \
USER ${UID}

# Copy the jlinked JRE
COPY --chown=${UID}:0 --from=mvnbuild-jdk17 ${AUTOTUNE_HOME}/src/autotune/jre/ ${AUTOTUNE_HOME}/app/jre/
COPY --chown=${UID}:0 --from=mvnbuild-jdk21 ${AUTOTUNE_HOME}/src/autotune/jre/ ${AUTOTUNE_HOME}/app/jre/
# Copy the app binaries
COPY --chown=${UID}:0 --from=mvnbuild-jdk17 ${AUTOTUNE_HOME}/src/autotune/target/ ${AUTOTUNE_HOME}/app/target/
COPY --chown=${UID}:0 --from=mvnbuild-jdk21 ${AUTOTUNE_HOME}/src/autotune/target/ ${AUTOTUNE_HOME}/app/target/

# Grant execute permission
RUN chmod -R +x $AUTOTUNE_HOME/app/target/bin/
Expand Down

0 comments on commit 442eeda

Please sign in to comment.