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"]