You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
605 B

FROM debian:bullseye-slim
RUN apt-get update; apt-get install -y --no-install-recommends ssh ca-certificates wget cron git
# configure GIT
RUN git config --global user.email "" ;\
git config --global user.name "automatic covid-collector" ;\
git config --global pull.rebase true
# copy preconfigured git repo
COPY git /root/git
# configure crontab
COPY collect.sh /root/collect.sh
RUN chmod +x /root/collect.sh
RUN echo '15 15 * * * root /root/collect.sh >> /var/log/collect.log 2>&1' >> /etc/crontab
# run cron in foreground so it blocks and keeps the container running
CMD ["cron", "-f"]