scraper dockerfile
Some checks failed
Build and Push Docker Images / build (push) Failing after 22s

This commit is contained in:
ChrQR 2024-05-30 00:28:56 +02:00
parent e2cda495d0
commit 85371b61ff

View File

@ -4,22 +4,21 @@ FROM python:3.9-slim
# Set the working directory in the container # Set the working directory in the container
WORKDIR /app WORKDIR /app
# Install cron and any needed packages specified in requirements.txt
RUN apt-get update && apt-get install -y cron \
&& pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app # Copy the current directory contents into the container at /app
COPY . /app COPY . /app
# Ensure cron is installed
RUN apt get update && apt get install -y cron
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the crontab file to the cron.d directory # Copy the crontab file to the cron.d directory
COPY crontab /etc/cron.d/scraper-cron COPY crontab /etc/cron.d/scraper-cron
# Give execution rights on the cron job # Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/scraper-cron RUN chmod 0644 /etc/cron.d/scraper-cron
# Apply cron job
RUN crontab /etc/cron.d/scraper-cron
# Create the log file to be able to run tail # Create the log file to be able to run tail
RUN touch /var/log/cron.log RUN touch /var/log/cron.log