fix docker implementation
This commit is contained in:
31
Dockerfile
31
Dockerfile
@@ -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"]
|
||||
|
Reference in New Issue
Block a user