-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cron
More file actions
27 lines (21 loc) · 769 Bytes
/
Copy pathDockerfile.cron
File metadata and controls
27 lines (21 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM debian:bookworm-slim
# Lightweight cron container — only needs curl and yt-dlp
RUN apt-get update && apt-get install -y \
curl \
cron \
python3 \
python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install yt-dlp (used for self-update checks)
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && \
chmod a+rx /usr/local/bin/yt-dlp
WORKDIR /app
COPY cron-job /etc/cron.d/feedrstream-cron
RUN chmod 0644 /etc/cron.d/feedrstream-cron && \
crontab /etc/cron.d/feedrstream-cron && \
touch /var/log/cron.log
COPY update-ytdlp.sh /app/update-ytdlp.sh
RUN chmod +x /app/update-ytdlp.sh
# Run cron in foreground and tail log
CMD cron && tail -f /var/log/cron.log