Skip to content

Commit 728481f

Browse files
committed
GH-16784 - migrate to chainguard
1 parent 8563bb9 commit 728481f

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.access.redhat.com/ubi8/ubi-minimal
1+
FROM 353750902984.dkr.ecr.us-east-1.amazonaws.com/thirdparty-chainguard-openjdk:v17-dev-latest
22

33
ARG H2O_VERSION
44
# Mandatory labels required by Red Hat for certification
@@ -9,21 +9,11 @@ LABEL "release"=${H2O_VERSION}
99
LABEL "summary"="H2O Open Source Machine Learning platform"
1010
LABEL "description"="H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc."
1111

12+
# Switch to root to install packages (Chainguard runs as non-root by default)
13+
USER root
14+
1215
# Install libgomp - to enable XGBoost multithreading
13-
RUN microdnf install wget tar gzip \
14-
&& microdnf install libgomp
15-
RUN microdnf clean all
16-
17-
# Install Java 17 (GraalVM Community Edition 22.2.0)
18-
RUN wget -O /tmp/graalvm-ce.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.2.0/graalvm-ce-java17-linux-amd64-22.2.0.tar.gz \
19-
&& mkdir /tmp/graalvm/ \
20-
&& cd /tmp/graalvm/ \
21-
&& tar xfz /tmp/graalvm-ce.tar.gz \
22-
&& mkdir /opt/java/ \
23-
&& cp -r graalvm-ce-* /opt/java/ \
24-
&& cd /opt/java/graalvm-ce-* \
25-
&& /bin/bash -c 'for cmd in $(ls bin/); do alternatives --install /usr/bin/$cmd $cmd $PWD/bin/$cmd 1; done' \
26-
&& rm -r /tmp/graalvm-ce.tar.gz /tmp/graalvm/
16+
RUN apk add --no-cache libgomp
2717

2818
# Copy H2O-3 artifact into the container
2919
RUN mkdir -p /opt/h2oai/h2o-3/
@@ -41,4 +31,5 @@ COPY LICENSE /licenses/
4131
# Overridable by the user
4232
CMD java -Djava.library.path=/opt/h2oai/h2o-3/xgb_lib_dir -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -jar /opt/h2oai/h2o-3/h2o.jar
4333

44-
USER 852
34+
# Switch to nonroot user (Chainguard default: UID 65532)
35+
USER 65532

0 commit comments

Comments
 (0)