From c390e7559d7d3dde23a54c9a9258432f866c5e64 Mon Sep 17 00:00:00 2001 From: ChrQR Date: Sat, 1 Jun 2024 17:02:24 +0200 Subject: [PATCH] install cron --- scrapers/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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