Reduce docker container size by usage of slim bookworm #745

This commit is contained in:
Philip Mayer
2025-08-21 00:04:56 +02:00
parent 3efb99f635
commit e49976bf8a

View File

@@ -1,4 +1,4 @@
FROM python:3.12-bookworm AS python-builder FROM python:3.12-slim-bookworm AS python-builder
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
@@ -32,7 +32,11 @@ COPY --chown=app:app spoolman /home/app/spoolman/spoolman
COPY --chown=app:app alembic.ini /home/app/spoolman/ COPY --chown=app:app alembic.ini /home/app/spoolman/
COPY --chown=app:app README.md /home/app/spoolman/ COPY --chown=app:app README.md /home/app/spoolman/
FROM python:3.12-bookworm AS python-runner FROM python:3.12-slim-bookworm AS python-runner
RUN apt-get update && apt-get install -y \
curl \
uvicorn
LABEL org.opencontainers.image.source=https://github.com/Donkie/Spoolman LABEL org.opencontainers.image.source=https://github.com/Donkie/Spoolman
LABEL org.opencontainers.image.description="Keep track of your inventory of 3D-printer filament spools." LABEL org.opencontainers.image.description="Keep track of your inventory of 3D-printer filament spools."