Merge branch 'master' of https://github.com/Womsxd/AutoMihoyoBBS
This commit is contained in:
commit
1c2c5c5ae9
@ -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
|
||||
|
||||
|
18
Dockerfile.arm32v6
Normal file
18
Dockerfile.arm32v6
Normal file
@ -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" ]
|
18
Dockerfile.arm32v7
Normal file
18
Dockerfile.arm32v7
Normal file
@ -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" ]
|
18
Dockerfile.arm64v8
Normal file
18
Dockerfile.arm64v8
Normal file
@ -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" ]
|
@ -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
|
Loading…
Reference in New Issue
Block a user