Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ concurrency:
cancel-in-progress: false

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

permissions: { }

Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
if: ${{ steps.pull.outputs.success == 'false' }}
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
build-args: OZONE_RUNNER_IMAGE
build-args: OZONE_IMAGE
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
37 changes: 37 additions & 0 deletions ADVANCED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# Advanced Configuration

The all-in-one image ships with sensible defaults baked into [`conf/ozone-site.xml`](conf/ozone-site.xml) and [`conf/core-site.xml`](conf/core-site.xml). These cover a single-DataNode cluster with replication of 1.

For one-off tweaks at runtime, you can override individual properties without rebuilding the image by mounting a custom config file.

## Override via mounted config

Mounting a file over `/etc/hadoop/ozone-site.xml` fully replaces the baked-in copy, so start by copying [`conf/ozone-site.xml`](conf/ozone-site.xml), edit the properties you want to change, then mount your version:

```bash
docker run -d \
--name ozone \
-p 9878:9878 -p 9888:9888 \
-v "$(pwd)/my-ozone-site.xml:/etc/hadoop/ozone-site.xml:ro" \
-v ozone-metadata:/data/metadata \
-v ozone-hdds:/data/hdds \
-v ozone-logs:/var/log/hadoop \
apache/ozone:all-in-one
```
78 changes: 0 additions & 78 deletions CONTRIBUTING.md

This file was deleted.

58 changes: 27 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,31 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG OZONE_RUNNER_IMAGE=apache/ozone-runner
ARG OZONE_RUNNER_VERSION=20260206-2-jdk21-slim
FROM ${OZONE_RUNNER_IMAGE}:${OZONE_RUNNER_VERSION}

ARG OZONE_VERSION=2.1.0
ARG OZONE_URL="https://www.apache.org/dyn/closer.lua?action=download&filename=ozone/${OZONE_VERSION}/ozone-${OZONE_VERSION}.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 && \
cd hadoop && \
sudo rm -rf \
CONTRIBUTING.md \
compose \
docs \
examples \
HISTORY.md \
kubernetes \
README.md \
SECURITY.md \
share/ozone/byteman \
share/ozone/lib/*-docs-*.jar \
share/ozone/lib/ozone-filesystem-hadoop*.jar \
smoketest \
tests

WORKDIR /opt/hadoop

CMD ["echo","Please check https://github.com/apache/ozone-docker for information."]
ARG OZONE_IMAGE=apache/ozone
ARG OZONE_IMAGE_VERSION=${OZONE_VERSION}-slim

FROM ${OZONE_IMAGE}:${OZONE_IMAGE_VERSION}

ENV OZONE_CONF_DIR=/etc/hadoop \
OZONE_LOG_DIR=/var/log/hadoop \
no_proxy=localhost,127.0.0.1

USER root

# Install pre-baked Ozone configuration and create data/log dirs owned by hadoop.
COPY conf/core-site.xml conf/ozone-site.xml /etc/hadoop/
RUN mkdir -p /data/metadata /data/hdds /var/log/hadoop \
&& chown -R hadoop:hadoop /data /var/log/hadoop \
&& chmod -R 755 /data

# Only S3 Gateway and Recon are user-facing in the quickstart.
EXPOSE 9878 9888

VOLUME ["/data/metadata", "/data/hdds", "/var/log/hadoop"]

COPY --chmod=755 start-all-services.sh /usr/local/bin/start-all-services.sh

USER hadoop

CMD ["/usr/local/bin/start-all-services.sh"]
Loading