Skip to content

Commit

Permalink
HDDS-8569. Build ozone-runner with JDK 11 for arm64 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai authored Nov 21, 2024
1 parent 1793fc1 commit 0b0afa1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand All @@ -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 }}
22 changes: 3 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RUN set -eux ; \
diffutils \
findutils \
fuse \
java-11-openjdk-devel \
jq \
krb5-workstation \
lsof \
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 0b0afa1

Please sign in to comment.