diff --git a/Dockerfile b/Dockerfile index 4c9e197..1243d7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib n echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list RUN apt-get update && \ - apt-get install -y wget curl rsync lftp git jq python-dev python-pip yum-utils createrepo aria2 + apt-get install -y wget curl rsync lftp git jq python-dev python-pip yum-utils createrepo aria2 awscli RUN pip3 install git+https://github.com/tuna/bandersnatch.git@master diff --git a/s3.sh b/s3.sh new file mode 100644 index 0000000..252d89f --- /dev/null +++ b/s3.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +[ ! -d "${TUNASYNC_WORKING_DIR}" ] && mkdir -p "${TUNASYNC_WORKING_DIR}" +aws --no-sign-request --endpoint-url="${TUNASYNC_S3_ENDPOINT}" s3 sync "${TUNASYNC_UPSTREAM_URL}" "${TUNASYNC_WORKING_DIR}" \ No newline at end of file