diff --git a/scrapers/Dockerfile b/scrapers/Dockerfile index b34c94d..277114a 100644 --- a/scrapers/Dockerfile +++ b/scrapers/Dockerfile @@ -11,6 +11,11 @@ COPY requirements.txt /app/ # Install the required Python packages RUN pip install -r requirements.txt +# Install cron and create log file +RUN apt-get update \ + && apt-get -y install cron \ + && touch /var/log/cron.log + # Copy the cron job file into the cron directory COPY cronjob /etc/cron.d/jobindex-cron @@ -20,8 +25,5 @@ RUN chmod 0644 /etc/cron.d/jobindex-cron # Apply cron job RUN crontab /etc/cron.d/jobindex-cron -# Create the log file to be able to run tail -RUN touch /var/log/cron.log - # Run the command on container startup -CMD cron && tail -f /var/log/cron.log +CMD ["cron", "-f"]