mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-06-12 19:58:56 +00:00
新增Docker构建amd64镜像
This commit is contained in:
@ -1,16 +1,21 @@
|
||||
#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
|
||||
|
||||
#FROM arm64v8/alpine:latest
|
||||
#FROM arm64v8/alpine:3.12
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV cron="0 9 * * 0"
|
||||
|
||||
RUN set -ex \
|
||||
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \
|
||||
# && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.cn/' /etc/apk/repositories \
|
||||
&& apk --update add --no-cache \
|
||||
tzdata \
|
||||
php7 php7-curl php7-json php7-mbstring php7-dom php7-simplexml php7-xml php7-zip \
|
||||
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 \
|
||||
&& echo "${TZ}" > /etc/timezone \
|
||||
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime
|
||||
|
||||
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"]
|
||||
|
4
docker/Arm64v8/build.n1.sh
Normal file
4
docker/Arm64v8/build.n1.sh
Normal file
@ -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
|
@ -1,4 +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 build -f Dockerfile -t iyuu:latest .
|
||||
docker run -it -v /root/config.php:/config.php --network bridge --name IYUUAutoReseed --restart always -d iyuu:latest
|
||||
docker exec -it IYUUAutoReseed php iyuu.php
|
@ -1,3 +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
|
||||
docker exec IYUUAutoReseed php iyuu.php
|
@ -1,3 +0,0 @@
|
||||
#!/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
|
Reference in New Issue
Block a user