install cron
All checks were successful
Build and Push Docker Images / build (push) Successful in 35s
All checks were successful
Build and Push Docker Images / build (push) Successful in 35s
This commit is contained in:
parent
17d9873640
commit
c390e7559d
@ -7,8 +7,9 @@ WORKDIR /app
|
|||||||
# Copy the current directory contents into the container at /app
|
# Copy the current directory contents into the container at /app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
# Install the required Python packages
|
# Install cron and the required Python packages
|
||||||
RUN pip install requests beautifulsoup4
|
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 and add a cron job to run the script every hour
|
||||||
COPY cronjob /etc/cron.d/jobindex-cron
|
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 touch /var/log/cron.log
|
||||||
|
|
||||||
# Run the command on container startup
|
# Run the command on container startup
|
||||||
CMD cron && tail -f /var/log/cron.log
|
CMD cron && tail -f /var/log/cron.log
|
||||||
|
Loading…
Reference in New Issue
Block a user