Skip to content

Commit 1aa8dee

Browse files
authored
HDDS-13446. Replace goofys with mountpoint-s3 (#50)
1 parent f244908 commit 1aa8dee

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

Dockerfile

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,6 @@
1616

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

3520
FROM rockylinux:9.3
3621
RUN set -eux ; \
@@ -57,7 +42,20 @@ RUN set -eux ; \
5742
&& ln -sf /usr/bin/python3 /usr/bin/python
5843
RUN sudo python3 -m pip install --upgrade pip
5944

45+
# CSI / k8s / fuse / goofys dependency
6046
COPY --from=go /go/bin/csc /usr/bin/csc
47+
# S3 FUSE support - mountpoint-s3
48+
ARG MOUNTPOINT_S3_VERSION=1.19.0
49+
RUN set -eux ; \
50+
ARCH="$(arch)"; \
51+
case "${ARCH}" in \
52+
x86_64) arch='x86_64' ;; \
53+
aarch64) arch='arm64' ;; \
54+
*) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \
55+
esac; \
56+
curl -L "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/${arch}/mount-s3-${MOUNTPOINT_S3_VERSION}-${arch}.rpm" -o mount-s3.rpm ; \
57+
dnf install -y mount-s3.rpm ; \
58+
rm -f mount-s3.rpm
6159

6260
# Install rclone for smoketest
6361
ARG RCLONE_VERSION=1.69.3
@@ -178,9 +176,6 @@ RUN chown hadoop /opt
178176
RUN mkdir -p /etc/security/keytabs && chmod -R a+wr /etc/security/keytabs
179177
COPY --chmod=644 krb5.conf /etc/
180178

181-
# CSI / k8s / fuse / goofys dependency
182-
COPY --from=go --chmod=755 /go/bin/goofys /usr/bin/goofys
183-
184179
# Create hadoop and data directories. Grant all permission to all on them
185180
RUN mkdir -p /etc/hadoop && mkdir -p /var/log/hadoop && chmod 1777 /etc/hadoop && chmod 1777 /var/log/hadoop
186181
ENV OZONE_LOG_DIR=/var/log/hadoop

0 commit comments

Comments
 (0)