Skip to content

Commit

Permalink
HDDS-11700. Use ozone-runner from GitHub in ozone image build (#33)
Browse files Browse the repository at this point in the history
(cherry picked from commit d1bb3b6)
  • Loading branch information
adoroszlai committed Nov 21, 2024
1 parent 1194e9d commit 5a9fc1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ permissions:
contents: read
packages: write

env:
OZONE_RUNNER_IMAGE: ghcr.io/apache/ozone-runner

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,6 +90,7 @@ jobs:
if: ${{ steps.pull.outputs.success == 'false' }}
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75
with:
build-args: OZONE_RUNNER_IMAGE
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM apache/ozone-runner:20240729-jdk17-1
ARG OZONE_RUNNER_IMAGE=apache/ozone-runner
FROM ${OZONE_RUNNER_IMAGE}:20241108-jdk17-1

ARG OZONE_URL=https://dlcdn.apache.org/ozone/1.4.0/ozone-1.4.0.tar.gz
WORKDIR /opt
RUN sudo rm -rf /opt/hadoop && curl -LSs -o ozone.tar.gz $OZONE_URL && tar zxf ozone.tar.gz && rm ozone.tar.gz && mv ozone* hadoop

WORKDIR /opt/hadoop
COPY log4j.properties /opt/hadoop/etc/hadoop/log4j.properties
COPY ozone-site.xml /opt/hadoop/etc/hadoop/ozone-site.xml
Expand Down

1 comment on commit 5a9fc1b

@smengcl
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I can confirm the latest 1.4.0-rocky image from Docker Hub works on arm64 Mac:

$ docker run --rm -it apache/ozone:1.4.0-rocky /bin/sh
...
Digest: sha256:9034aacee048ec1da3f37b75a93ebe461ff6492919d864efb889d398bbc0e967
Status: Downloaded newer image for apache/ozone:1.4.0-rocky
sh-5.1$ arch
aarch64
sh-5.1$ java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)

Previous build's arm64 image (from 9 days ago) would fail to start:

$ docker run --rm -it apache/ozone:1.4.0-rocky /bin/sh
assertion failed [result.value != EEXIST]: VmTracker attempted to allocate existing mapping
(ThreadContextVm.cpp:47 mmap)

Please sign in to comment.