32 lines
791 B
Docker
32 lines
791 B
Docker
FROM python:3.12-slim
|
|
|
|
ARG F1TV_EPG_REPO=https://github.com/J-Lich/F1TV-EPG.git
|
|
ARG F1TV_EPG_REF=main
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
OUTPUT_DIR=/output \
|
|
OUTPUT_FILE=guide.xml \
|
|
REFRESH_INTERVAL_MINUTES=15 \
|
|
RUN_ONCE=0
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends git ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
RUN git clone --depth 1 --branch "$F1TV_EPG_REF" "$F1TV_EPG_REPO" . \
|
|
&& pip install --no-cache-dir -r requirements.txt \
|
|
&& rm -rf .git .github
|
|
|
|
COPY entrypoint.sh /app/entrypoint.sh
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
VOLUME ["/output"]
|
|
|
|
HEALTHCHECK --interval=30m --timeout=5s --start-period=5m --retries=3 \
|
|
CMD test -s "$OUTPUT_DIR/$OUTPUT_FILE"
|
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|