This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch jdk11
in repository https://gitbox.apache.org/repos/asf/ozone-docker-runner.git


The following commit(s) were added to refs/heads/jdk11 by this push:
     new 0b0afa1  HDDS-8569. Build ozone-runner with JDK 11 for arm64 (#35)
0b0afa1 is described below

commit 0b0afa1c93bd10498854d5e1132e61f788a64832
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Thu Nov 21 06:38:19 2024 +0100

    HDDS-8569. Build ozone-runner with JDK 11 for arm64 (#35)
---
 .github/workflows/build.yaml | 10 +++++++++-
 Dockerfile                   | 22 +++-------------------
 2 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 02ae644..df0a323 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -62,6 +62,14 @@ jobs:
 
           echo "success=$success" >> $GITHUB_OUTPUT
 
+      - name: Set up QEMU
+        if: ${{ steps.pull.outputs.success == 'false' }}
+        uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
+
+      - name: Set up Docker Buildx
+        if: ${{ steps.pull.outputs.success == 'false' }}
+        uses: 
docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349
+
       - name: Login to GitHub Container Registry
         id: login
         if: ${{ github.event_name != 'pull_request' && 
steps.pull.outputs.success == 'false' }}
@@ -76,7 +84,7 @@ jobs:
         if: ${{ steps.pull.outputs.success == 'false' }}
         uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
         with:
-          platforms: linux/amd64
+          platforms: linux/amd64,linux/arm64
           push: ${{ github.event_name != 'pull_request' }}
           tags: ${{ steps.meta.outputs.tags }}
           labels: ${{ steps.meta.outputs.labels }}
diff --git a/Dockerfile b/Dockerfile
index c1ef8bc..ce6165b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -39,6 +39,7 @@ RUN set -eux ; \
       diffutils \
       findutils \
       fuse \
+      java-11-openjdk-devel \
       jq \
       krb5-workstation \
       lsof \
@@ -96,27 +97,10 @@ RUN set -eux ; \
     curl -L ${url} | tar xvz ; \
     mv async-profiler-* /opt/profiler
 
-# OpenJDK 11
-RUN set -eux ; \
-    ARCH="$(arch)"; \
-    case "${ARCH}" in \
-        x86_64) \
-            
url='https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz';
 \
-            
sha256='99be79935354f5c0df1ad293620ea36d13f48ec3ea870c838f20c504c9668b57'; \
-            ;; \
-        *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \
-    esac && \
-    curl -L ${url} -o openjdk.tar.gz && \
-    echo "${sha256} *openjdk.tar.gz" | sha256sum -c - && \
-    tar xzvf openjdk.tar.gz -C /usr/local && \
-    rm -f openjdk.tar.gz
-
-ENV JAVA_HOME=/usr/local/jdk-11.0.2
-# compatibility with Ozone 1.4.0 and earlier compose env.
-RUN mkdir -p /usr/lib/jvm && ln -s $JAVA_HOME /usr/lib/jvm/jre
+ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk
 
 ENV LD_LIBRARY_PATH=/usr/local/lib
-ENV PATH=/opt/hadoop/libexec:$PATH:$JAVA_HOME/bin:/opt/hadoop/bin
+ENV PATH=/opt/hadoop/libexec:$PATH:/opt/hadoop/bin
 
 RUN id=1000; \
     for u in hadoop om dn scm s3g recon testuser testuser2 httpfs; do \


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to