diff --git a/interapp-backend/scheduler/dev.Dockerfile b/interapp-backend/scheduler/dev.Dockerfile index 3785c337..fbd235aa 100644 --- a/interapp-backend/scheduler/dev.Dockerfile +++ b/interapp-backend/scheduler/dev.Dockerfile @@ -15,6 +15,19 @@ RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg m # update and install postgresql-client-16, tzdata RUN apt-get update && apt-get install -y --fix-missing postgresql-client-16 tzdata && apt-get clean +RUN ARCH=$(case "$(uname -m)" in "x86_64") echo "amd64";; "ppc64le") echo "ppc64le";; *) echo "Unsupported architecture"; exit 1;; esac) && \ + DOWNLOAD_URL=$(case "$ARCH" in "amd64") echo "https://dl.min.io/client/mc/release/linux-amd64/mc";; "ppc64le") echo "https://dl.min.io/client/mc/release/linux-ppc64le/mc";; *) echo "Unsupported architecture"; exit 1;; esac) && \ + # Install wget to download MinIO client + apt-get update && apt-get install -y wget && \ + # Download MinIO client binary + wget -O /usr/local/bin/mc "$DOWNLOAD_URL" && \ + # Make MinIO client binary executable + chmod +x /usr/local/bin/mc && \ + # Clean up + apt-get clean && rm -rf /var/lib/apt/lists/* && \ + # Output success message + echo "MinIO client installed successfully." + ENV TZ=Asia/Singapore RUN ln -snf /usr/share/zoneinfo/"$TZ" /etc/localtime && echo "$TZ" > /etc/timezone RUN apt-get clean diff --git a/interapp-backend/scheduler/prod.Dockerfile b/interapp-backend/scheduler/prod.Dockerfile index ce249c53..99f72104 100644 --- a/interapp-backend/scheduler/prod.Dockerfile +++ b/interapp-backend/scheduler/prod.Dockerfile @@ -15,6 +15,19 @@ RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg m # update and install postgresql-client-16, tzdata RUN apt-get update && apt-get install -y --fix-missing postgresql-client-16 tzdata && apt-get clean +RUN ARCH=$(case "$(uname -m)" in "x86_64") echo "amd64";; "ppc64le") echo "ppc64le";; *) echo "Unsupported architecture"; exit 1;; esac) && \ + DOWNLOAD_URL=$(case "$ARCH" in "amd64") echo "https://dl.min.io/client/mc/release/linux-amd64/mc";; "ppc64le") echo "https://dl.min.io/client/mc/release/linux-ppc64le/mc";; *) echo "Unsupported architecture"; exit 1;; esac) && \ + # Install wget to download MinIO client + apt-get update && apt-get install -y wget && \ + # Download MinIO client binary + wget -O /usr/local/bin/mc "$DOWNLOAD_URL" && \ + # Make MinIO client binary executable + chmod +x /usr/local/bin/mc && \ + # Clean up + apt-get clean && rm -rf /var/lib/apt/lists/* && \ + # Output success message + echo "MinIO client installed successfully." + ENV TZ=Asia/Singapore RUN ln -snf /usr/share/zoneinfo/"$TZ" /etc/localtime && echo "$TZ" > /etc/timezone RUN apt-get clean