Dockerfile 547 B

123456789101112
  1. FROM docker:rc-git
  2. WORKDIR /scheduler
  3. COPY watch.sh .
  4. RUN git clone --branch dev https://1d5ea1815adcccafb9179839419558593e378589@git.luminad.com/Elsevier/Elsevier_Scheduler.git
  5. RUN docker login docker.luminad.com -u dockeradmin -p Welcome@123!
  6. # Create the log file to be able to run tail
  7. RUN touch /var/log/cron.log
  8. # Setup cron job
  9. RUN (crontab -l ; echo "*/1 * * * * /bin/sh /scheduler/watch.sh >> /var/log/cron.log 2>&1") | crontab -
  10. # Run the command on container startup
  11. CMD busybox crond -L /var/log/cron.log && tail -f /var/log/cron.log