diff --git a/scrapers/Dockerfile b/scrapers/Dockerfile index 2907bb8..626418e 100644 --- a/scrapers/Dockerfile +++ b/scrapers/Dockerfile @@ -7,8 +7,9 @@ WORKDIR /app # Copy the current directory contents into the container at /app COPY . /app -# Install the required Python packages -RUN pip install requests beautifulsoup4 +# Install cron and the required Python packages +RUN apt-get update && apt-get install -y cron && \ + pip install requests beautifulsoup4 # Copy and add a cron job to run the script every hour COPY cronjob /etc/cron.d/jobindex-cron @@ -23,4 +24,4 @@ RUN crontab /etc/cron.d/jobindex-cron RUN touch /var/log/cron.log # Run the command on container startup -CMD cron && tail -f /var/log/cron.log \ No newline at end of file +CMD cron && tail -f /var/log/cron.log