FROM cloudron/base:4.2.0@sha256:46da2fffb36353ef714f97ae8e962bd2c212ca091108d768ba473078319a47f4

RUN mkdir -p /app/code
WORKDIR /app/code

ARG VERSION=RELEASE.2024-09-09T16-59-28Z

# sometimes here https://dl.min.io/server/minio/release/linux-amd64/archive/
# RUN wget https://dl.min.io/server/minio/release/linux-amd64/minio.${VERSION} -O /app/code/minio && chmod +x /app/code/minio
RUN wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio.${VERSION} -O /app/code/minio && chmod +x /app/code/minio
# https://dl.min.io/client/mc/release/linux-amd64/
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /app/code/mc && chmod +x /app/code/mc

COPY env.sh.template start.sh /app/code/

CMD [ "/app/code/start.sh" ]
