Skip to content

Commit

Permalink
chore: install mc client with dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
SebassNoob committed Apr 19, 2024
1 parent aa857c6 commit 4fe2f99
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions interapp-backend/scheduler/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
Expand Down
13 changes: 13 additions & 0 deletions interapp-backend/scheduler/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
Expand Down

0 comments on commit 4fe2f99

Please sign in to comment.