diff --git a/Dockerfile b/Dockerfile index 3ec3b53..0b88053 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,9 @@ FROM python:3-alpine -LABEL maintainer="mailto@wolfbolin.com" +LABEL maintainer="x.yangtze.river@gmail.com" ENV CRON_SIGNIN='30 9 * * *' ENV MULTI=TRUE ENV TZ=Asia/Shanghai -RUN adduser app -D RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ && apk add --no-cache tzdata @@ -12,7 +11,6 @@ WORKDIR /tmp ADD requirements.txt ./ RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt -USER app WORKDIR /var/app COPY . /var/app diff --git a/Dockerfile.arm32v6 b/Dockerfile.arm32v6 new file mode 100644 index 0000000..6dd4a56 --- /dev/null +++ b/Dockerfile.arm32v6 @@ -0,0 +1,18 @@ +FROM arm32v6/python:3-alpine +COPY qemu-arm-static /usr/bin/ +LABEL maintainer="x.yangtze.river@gmail.com" + +ENV CRON_SIGNIN='30 9 * * *' +ENV MULTI=TRUE +ENV TZ=Asia/Shanghai +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ + && apk add --no-cache tzdata + +WORKDIR /tmp +ADD requirements.txt ./ +RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt + +WORKDIR /var/app +COPY . /var/app + +CMD ["python3", "./docker.py" ] diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 new file mode 100644 index 0000000..288f953 --- /dev/null +++ b/Dockerfile.arm32v7 @@ -0,0 +1,18 @@ +FROM arm32v7/python:3-alpine +COPY qemu-arm-static /usr/bin/ +LABEL maintainer="x.yangtze.river@gmail.com" + +ENV CRON_SIGNIN='30 9 * * *' +ENV MULTI=TRUE +ENV TZ=Asia/Shanghai +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ + && apk add --no-cache tzdata + +WORKDIR /tmp +ADD requirements.txt ./ +RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt + +WORKDIR /var/app +COPY . /var/app + +CMD ["python3", "./docker.py" ] diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 new file mode 100644 index 0000000..e34e2d5 --- /dev/null +++ b/Dockerfile.arm64v8 @@ -0,0 +1,18 @@ +FROM arm64v8/python:3-alpine +COPY qemu-arm-static /usr/bin/ +LABEL maintainer="x.yangtze.river@gmail.com" + +ENV CRON_SIGNIN='30 9 * * *' +ENV MULTI=TRUE +ENV TZ=Asia/Shanghai +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ + && apk add --no-cache tzdata + +WORKDIR /tmp +ADD requirements.txt ./ +RUN pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt + +WORKDIR /var/app +COPY . /var/app + +CMD ["python3", "./docker.py" ] diff --git a/make-docker.sh b/make-docker.sh deleted file mode 100644 index e6e5008..0000000 --- a/make-docker.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -docker_name="mihoyo-bbs" -docker stop ${docker_name} -docker rm ${docker_name} -echo -e "\033[5;36mOrz 旧容器(镜像)已清理\033[0m" - -time_now=$(date "+%m%d%H") -docker build -f Dockerfile --tag ${docker_name}:"${time_now}" . -echo -e "\033[5;36mOrz 镜像重建完成\033[0m" - -docker run -itd \ - --name ${docker_name} \ - --log-opt max-size=1m \ - -v $(pwd):/var/app \ - ${docker_name}:"${time_now}" -echo -e "\033[5;36mOrz 镜像启动完成\033[0m" -docker ps -a -docker logs ${docker_name} -f \ No newline at end of file