Skip to content

Commit

Permalink
Account for platform in image mc client download.
Browse files Browse the repository at this point in the history
Account for building in environments other than Linux X86_64 when
downloading the MinIO client for the ngen worker images.
  • Loading branch information
robertbartel committed Aug 22, 2024
1 parent 0b2563c commit f85ea7b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docker/main/ngen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,20 @@ USER root
# https://dl.min.io/client/mc/release/linux-amd64/archive/mc.${MINIO_CLIENT_RELEASE}

# Setup minio client; also update path and make sure dataset directory is there
RUN curl -L -o /dmod/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc \
RUN OS_NAME=$(uname -s | tr '[:upper:]' '[:lower:]') \
&& PLATFORM=$(uname -m | tr '[:upper:]' '[:lower:]') \
&& case "${PLATFORM:?}" in \
aarch64) \
MINIO_HW_NAME=arm64 \
;; \
x86_64) \
MINIO_HW_NAME=amd64 \
;; \
*) \
MINIO_HW_NAME=${PLATFORM} \
;; \
esac \
&& curl -L -o /dmod/bin/mc https://dl.min.io/client/mc/release/${OS_NAME}-${MINIO_HW_NAME}/mc \
&& chmod +x /dmod/bin/mc \
&& mkdir /dmod/.mc \
&& echo "export PATH=${PATH}" >> /etc/profile \
Expand Down

0 comments on commit f85ea7b

Please sign in to comment.