Updated Approach to Scheduling

This commit is contained in:
Nicole Rappe
2023-09-22 00:48:25 -06:00
parent 4fdaf788b5
commit 9038a7c9b2
4 changed files with 47 additions and 49 deletions

View File

@ -2,17 +2,13 @@ FROM ubuntu:latest
# Install necessary packages
RUN apt-get update && \
apt-get install -y git curl cron rsync
apt-get install -y git curl rsync
# Add script and cronjob
# Add script
COPY repo_watcher.sh /root/Repo_Watcher/repo_watcher.sh
COPY crontab.txt /crontab.txt
# Make script executable
RUN chmod +x /root/Repo_Watcher/repo_watcher.sh
# Apply cron job
RUN crontab /crontab.txt
# Start cron in foreground
CMD ["cron", "-f"]
# Start script
CMD ["/bin/bash", "-c", "/root/Repo_Watcher/repo_watcher.sh"]