Merge pull request 'New image based on python-alpine. Image size reduced by 2. A bit is a bit.' (#5) from wip-python into main

Reviewed-on: #5
This commit is contained in:
Djeex 2025-06-01 19:28:56 +02:00
commit bb6634ffc1

View File

@ -1,17 +1,14 @@
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends curl tzdata && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir requests pyyaml schedule
FROM python:3.11-alpine
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apk add --no-cache tzdata curl \
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& pip install --no-cache-dir requests pyyaml schedule
WORKDIR /app
COPY blocklist_scheduler.py /app/blocklist_scheduler.py
COPY blocklist_scheduler.py .
RUN chmod +x /app/blocklist_scheduler.py
ENTRYPOINT ["python3", "/app/blocklist_scheduler.py"]
ENTRYPOINT ["python3", "blocklist_scheduler.py"]