From 8813afbd737c8c3c0f3d3b9b66763503f5ac2b40 Mon Sep 17 00:00:00 2001 From: "iyuu.cn" <367013672@qq.com> Date: Tue, 28 Jul 2020 03:26:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Edocker=E9=95=9C=E5=83=8FArm64?= =?UTF-8?q?v8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/Arm64v8/Dockerfile | 16 ++++++++++++++++ docker/Arm64v8/build.sh | 4 ++++ docker/Arm64v8/iyuu.sh | 3 +++ docker/Arm64v8/task.sh | 3 +++ 4 files changed, 26 insertions(+) create mode 100644 docker/Arm64v8/Dockerfile create mode 100644 docker/Arm64v8/build.sh create mode 100644 docker/Arm64v8/iyuu.sh create mode 100644 docker/Arm64v8/task.sh diff --git a/docker/Arm64v8/Dockerfile b/docker/Arm64v8/Dockerfile new file mode 100644 index 0000000..55d3cb7 --- /dev/null +++ b/docker/Arm64v8/Dockerfile @@ -0,0 +1,16 @@ +#FROM alpine:latest +FROM arm64v8/alpine + +RUN set -ex \ + && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \ + && apk --update add --no-cache tzdata php7 php7-curl php7-json php7-mbstring git \ + && git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \ + && cp /IYUU/config/config.sample.php /IYUU/config/config.php \ + && ln -sf /IYUU/config/config.php /config.php + +ENV TZ Asia/Shanghai +ENV cron="0 9 * * 0" + +WORKDIR /IYUU + +CMD ["sh", "-c", "/usr/bin/php /IYUU/iyuu.php ; /usr/sbin/crond ; (crontab -l ;echo \"$cron /usr/bin/php /IYUU/iyuu.php &> /dev/null\") | crontab - ; tail -f /dev/null"] diff --git a/docker/Arm64v8/build.sh b/docker/Arm64v8/build.sh new file mode 100644 index 0000000..74f2e0e --- /dev/null +++ b/docker/Arm64v8/build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +docker build -t iyuu:latest . +docker run -it -v /root/config.php:/config.php -v /var/lib/transmission/torrents:/torrents -v /var/lib/qbittorrent/.local/share/data/qBittorrent/BT_backup:/BT_backup --network bridge --name IYUUAutoReseed --restart always -d iyuu:latest +docker exec -it IYUUAutoReseed php iyuu.php \ No newline at end of file diff --git a/docker/Arm64v8/iyuu.sh b/docker/Arm64v8/iyuu.sh new file mode 100644 index 0000000..358d045 --- /dev/null +++ b/docker/Arm64v8/iyuu.sh @@ -0,0 +1,3 @@ +#!/bin/sh +export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin +docker exec -it IYUUAutoReseed php iyuu.php \ No newline at end of file diff --git a/docker/Arm64v8/task.sh b/docker/Arm64v8/task.sh new file mode 100644 index 0000000..9ebf943 --- /dev/null +++ b/docker/Arm64v8/task.sh @@ -0,0 +1,3 @@ +#!/bin/sh +export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin +docker exec IYUUAutoReseed php iyuu.php \ No newline at end of file