19 lines
481 B
Docker
19 lines
481 B
Docker
FROM python:3.11-slim
|
|
|
|
# Install systemd so the container has the 'journalctl' command available
|
|
RUN apt-get update && \
|
|
apt-get install -y systemd && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy our script
|
|
COPY daily_summary.py .
|
|
|
|
# Run Python in unbuffered mode (-u) so we can see logs in real-time via 'docker logs'
|
|
CMD ["python", "-u", "daily_summary.py"]
|