refactor(docker): reduce package duplication due to weasyprint (#13440)

This commit is contained in:
Matthias Mair authored and GitHub committed 2026-12-03 20:02:49 +11:00
1 parent e8c9df8884
commit ce560053a6
1 file changed
+4 -7
+4 -7
View File
@@ -63,8 +63,10 @@ LABEL org.opencontainers.image.vendor="inventree" \
# Install basic system level packages
RUN apt-get update && apt-get install -y --no-install-recommends \
git gettext libldap2 wget curl ssh \
# Weasyprint requirements : https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#alpine-3-12
weasyprint libpango-1.0-0 libcairo2 poppler-utils \
# Native libraries for the weasyprint python package (installed from requirements.txt) instead of weasyprint:
# https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#debian-11
libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0 \
libcairo2 poppler-utils \
# Database client libraries
postgresql-client mariadb-client \
# font support
@@ -73,11 +75,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Remove heavy python packages installed by weasyprint (that we don't need)
RUN rm -rf /usr/lib/python3/dist-packages/numpy \
&& rm -rf /usr/lib/python3/dist-packages/scipy \
&& rm -rf /usr/lib/python3/dist-packages/sympy
EXPOSE 8000
# Fix invoke command path for InvenTree environment check