Slimmer docker image + fifo file check

This commit is contained in:
2025-08-13 16:20:46 +00:00
parent efe1bbca29
commit 43c007c1fe
2 changed files with 10 additions and 28 deletions

View File

@ -1,42 +1,19 @@
FROM python:3.11-alpine
RUN apk add --no-cache --virtual .build-deps \
build-base \
jpeg-dev \
zlib-dev \
libffi-dev \
musl-dev \
&& apk add --no-cache \
jpeg \
zlib \
libwebp \
bash
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt \
&& apk del .build-deps
RUN pip install --no-cache-dir -r requirements.txt
RUN rm -rf /var/cache/apk/*
# Copy source code and scripts
COPY ./src/ ./src/
COPY ./build.py ./build.py
COPY ./gallery.py ./gallery.py
# Copy default config
COPY ./config /app/default
# Copy entrypoint and make executable
COPY ./docker/.sh/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Add wrapper scripts for convenience commands
RUN printf '#!/bin/sh\n/app/entrypoint.sh build\n' > /usr/local/bin/build && chmod +x /usr/local/bin/build && \
printf '#!/bin/sh\n/app/entrypoint.sh gallery\n' > /usr/local/bin/gallery && chmod +x /usr/local/bin/gallery
ENTRYPOINT ["/app/entrypoint.sh"]
ENTRYPOINT ["/app/entrypoint.sh"]