mirror.dongdigua.github.io/gmi/docker/Dockerfile

22 lines
685 B
Docker
Raw Normal View History

2023-05-26 19:21:35 +08:00
FROM alpine:latest
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
&& sed -i 'a https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/testing' /etc/apk/repositories \
2023-05-29 11:18:04 +08:00
&& apk add agate git \
&& touch /var/log/git.log
2023-05-26 19:21:35 +08:00
RUN git clone https://github.com/dongdigua/dongdigua.github.io.git --depth 1
COPY run-wrapper.sh .
2023-05-29 11:18:04 +08:00
# https://weinan.io/2019/04/06/cron.html
2023-05-26 19:21:35 +08:00
COPY update-git.sh /etc/periotic/daily/
2023-05-29 11:18:04 +08:00
# for testing purpose only
# RUN mkdir /etc/periodic/1min \
# && echo "*/1 * * * * run-parts /etc/periodic/1min" \
# >> /var/spool/cron/crontabs/root
# COPY update-git.sh /etc/periodic/1min/
2023-05-26 19:21:35 +08:00
CMD [ "./run-wrapper.sh" ]