fix docker implementation

This commit is contained in:
2025-07-20 18:28:26 +00:00
parent 5185f2d9fd
commit a5bf821186
12 changed files with 112 additions and 77 deletions

View File

@@ -1,28 +1,9 @@
# Use a lightweight Python base image
FROM python:3.13-slim-bookworm
FROM python:3.11.5-alpine
# Set the working directory in the container
WORKDIR /app
RUN pip install uv
COPY . .
RUN uv sync
RUN chmod +x entrypoint.sh
# Install uv and dependencies
COPY pyproject.toml ./
RUN apt-get update && apt-get install -y cron \
&& rm -rf /var/lib/apt/lists/*
RUN pip install uv && uv sync
# Copy the application code
COPY szuru-eink.py ./
COPY epd/ ./epd/
# Copy the cron job script and crontab file
COPY cron_job.sh /usr/local/bin/cron_job.sh
COPY crontab /etc/cron.d/szuru-eink-cron
# Give execution rights on the cron job script
RUN chmod +x /usr/local/bin/cron_job.sh
# Apply cron job
RUN crontab /etc/cron.d/szuru-eink-cron
# Run cron
CMD ["cron", "-f"]
ENTRYPOINT ["./entrypoint.sh"]