FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df

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

ARG VERSION=RELEASE.2022-12-07T00-56-37Z

# 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 start.sh /app/code/

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