Created
May 17, 2023 23:43
-
-
Save Neirth/6d2fd5c5a63e7420ed927c0b7aea0ef2 to your computer and use it in GitHub Desktop.
Revisions
-
Neirth created this gist
May 17, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ FROM alpine:edge # Install the rest of dependencies inside minio image RUN apk add minio supervisor rclone fuse3 # Prepare data temp folder RUN mkdir -p /data/backup # Configure rclone remote path ENV REMOTE_PATH # Configure supervisord for interact with minio and rclone RUN echo -e ' \n\ [supervisord] \n\ nodaemon=true \n\ user=root \n\ loglevel=info \n\ \n\ [program:minio] \n\ command=/bin/sh -c "sleep 5 && minio server /data --console-address 0.0.0.0:9001" \n\ stdout_logfile=/dev/stdout \n\ stdout_logfile_maxbytes=0 \n\ stderr_logfile=/dev/stderr \n\ stderr_logfile_maxbytes=0 \n\ \n\ [program:rclone] \n\ command=/bin/sh -c "/usr/bin/rclone --config=/etc/rclone.conf mount $REMOTE_PATH /data/ --vfs-cache-mode writes --cache-dir /tmp --allow-non-empty" \n\ stdout_logfile=/dev/stdout \n\ stdout_logfile_maxbytes=0 \n\ stderr_logfile=/dev/stderr \n\ stderr_logfile_maxbytes=0 \n\ ' >> /etc/supervisord.conf # Expose minio ports EXPOSE 9000 EXPOSE 9001 # Configure exposable rclone config VOLUME ["/etc/rclone/config"] # Set the entrypoint for supervisord ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]