2 Commits

Author SHA1 Message Date
40a01c4701 Merge pull request 'Multi-stage smaller alpine docker image and python 3.13' (#24) from alpine into main
Reviewed-on: #24
2025-09-19 22:51:22 +02:00
Djeex
28e3b087b0 Alpine - smaller image 2025-09-19 22:40:30 +02:00
3 changed files with 13 additions and 8 deletions

View File

@@ -1,10 +1,18 @@
FROM python:3.11-slim FROM python:3.13-alpine AS builder
WORKDIR /app WORKDIR /app
COPY requirements.txt . RUN apk add --no-cache gcc musl-dev jpeg-dev zlib-dev
RUN pip install --no-cache-dir -r requirements.txt COPY requirements.txt .
RUN pip wheel --no-cache-dir --wheel-dir=/wheels -r requirements.txt
FROM python:3.13-alpine
WORKDIR /app
COPY --from=builder /wheels /wheels
RUN pip install --no-cache-dir --find-links=/wheels /wheels/* && rm -rf /wheels
COPY build.py gallery.py VERSION /app/ COPY build.py gallery.py VERSION /app/
COPY ./src/ ./src/ COPY ./src/ ./src/
@@ -12,7 +20,4 @@ COPY ./config /app/default
COPY ./docker/.sh/entrypoint.sh /app/entrypoint.sh COPY ./docker/.sh/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh RUN chmod +x /app/entrypoint.sh
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"]

View File

@@ -1 +1 @@
2.1.0 2.1.1

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
set -e set -e
CYAN="\033[1;36m" CYAN="\033[1;36m"