Skip to content
Merged
Changes from 1 commit
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
30 changes: 12 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,6 @@

FROM golang:1.17.8-buster AS go
RUN go install github.com/rexray/gocsi/csc@latest
# Compile latest goofys for arm64 if necessary, which doesn't have a released binary
RUN set -eux ; \
ARCH="$(arch)"; \
if [ ${ARCH} = "aarch64" ]; then \
git clone https://github.com/kahing/goofys.git ; \
cd goofys ; \
git checkout 08534b2 ; \
go build ; \
mv goofys /go/bin/ ; \
elif [ ${ARCH} = "x86_64" ]; then \
curl -L https://github.com/kahing/goofys/releases/download/v0.24.0/goofys -o /go/bin/goofys ; \
else \
echo "Unsupported architecture: ${ARCH}"; \
exit 1 ; \
fi

FROM rockylinux:9.3
RUN set -eux ; \
Expand All @@ -57,7 +42,19 @@ RUN set -eux ; \
&& ln -sf /usr/bin/python3 /usr/bin/python
RUN sudo python3 -m pip install --upgrade pip

# CSI / k8s / fuse / goofys dependency
COPY --from=go /go/bin/csc /usr/bin/csc
# S3 FUSE support
RUN set -eux ; \
ARCH="$(arch)"; \
case "${ARCH}" in \
x86_64) arch='x86_64' ;; \
aarch64) arch='arm64' ;; \
*) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \
esac; \
curl -L -o /tmp/mount-s3.rpm "https://s3.amazonaws.com/mountpoint-s3-release/latest/${arch}/mount-s3.rpm"; \
dnf install -y /tmp/mount-s3.rpm; \
rm -f /tmp/mount-s3.rpm
Copy link
Contributor

@jojochuang jojochuang Jul 17, 2025

Choose a reason for hiding this comment

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

Suggest to use a fixed version instead of the latest version:

Suggested change
RUN set -eux ; \
ARCH="$(arch)"; \
case "${ARCH}" in \
x86_64) arch='x86_64' ;; \
aarch64) arch='arm64' ;; \
*) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \
esac; \
curl -L -o /tmp/mount-s3.rpm "https://s3.amazonaws.com/mountpoint-s3-release/latest/${arch}/mount-s3.rpm"; \
dnf install -y /tmp/mount-s3.rpm; \
rm -f /tmp/mount-s3.rpm
RUN set -eux ; \
ARCH="$(arch)"; \
MOUNTPOINT_S3_VERSION="1.19.0"; \
case "${ARCH}" in \
x86_64) url="https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/x86_64/mount-s3-${MOUNTPOINT_S3_VERSION}-x86_64.rpm" ;; \
aarch64) url="https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/arm64/mount-s3-${MOUNTPOINT_S3_VERSION}-arm64.rpm" ;; \
*) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \
esac; \
curl -L ${url} -o mount-s3.rpm ; \
dnf install -y mount-s3.rpm ; \
rm -f mount-s3.rpm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @jojochuang , it's a better solution.
I will modify it ASAP.


# Install rclone for smoketest
ARG RCLONE_VERSION=1.69.3
Expand Down Expand Up @@ -178,9 +175,6 @@ RUN chown hadoop /opt
RUN mkdir -p /etc/security/keytabs && chmod -R a+wr /etc/security/keytabs
COPY --chmod=644 krb5.conf /etc/

# CSI / k8s / fuse / goofys dependency
COPY --from=go --chmod=755 /go/bin/goofys /usr/bin/goofys

# Create hadoop and data directories. Grant all permission to all on them
RUN mkdir -p /etc/hadoop && mkdir -p /var/log/hadoop && chmod 1777 /etc/hadoop && chmod 1777 /var/log/hadoop
ENV OZONE_LOG_DIR=/var/log/hadoop
Expand Down