From 868cd51f2f4a121cfc71d3022974a2c27cb802c6 Mon Sep 17 00:00:00 2001 From: Fred van Dijk Date: Tue, 4 Jul 2023 16:28:45 +0200 Subject: [PATCH] Add environment variable to speed up pip reruns, see https://github.com/pypa/pip/issues/12079 . Needed until next version of pip (23.2.X is released) --- Dockerfile | 3 +++ Dockerfile.acceptance | 5 +++++ Dockerfile.classicui | 2 ++ Dockerfile.dev | 3 ++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9b57aeb..ae1c1b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,10 @@ WORKDIR /app COPY --from=builder --chown=500:500 /app /app # Enable compilation of po files into mo files (This is added here for backward compatibility) + ENV zope_i18n_compile_mo_files=true +# https://github.com/pypa/pip/issues/12079 +ENV _PIP_USE_IMPORTLIB_METADATA=0 # Link /data (the exposed volume) into /app/var RUN ln -s /data /app/var diff --git a/Dockerfile.acceptance b/Dockerfile.acceptance index 21b1d35..f59b7b4 100644 --- a/Dockerfile.acceptance +++ b/Dockerfile.acceptance @@ -3,6 +3,9 @@ ARG PYTHON_VERSION=3.11 ARG PLONE_VERSION FROM plone/server-builder:${PLONE_VERSION} as builder +# https://github.com/pypa/pip/issues/12079 +ENV _PIP_USE_IMPORTLIB_METADATA=0 + # Install robotframework support RUN /app/bin/pip install plone.app.robotframework>=2.0.0 @@ -29,6 +32,8 @@ ENV LISTEN_PORT=${ZSERVER_PORT} ENV APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage # Packages to be used in configuration ENV CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors +# https://github.com/pypa/pip/issues/12079 +ENV _PIP_USE_IMPORTLIB_METADATA=0 RUN ln -s /data /app/var diff --git a/Dockerfile.classicui b/Dockerfile.classicui index 217899d..ac1383d 100644 --- a/Dockerfile.classicui +++ b/Dockerfile.classicui @@ -24,3 +24,5 @@ RUN ln -s /data /app/var # Setup default type for site creation to be classic ENV TYPE=classic +# https://github.com/pypa/pip/issues/12079 +ENV _PIP_USE_IMPORTLIB_METADATA=0 diff --git a/Dockerfile.dev b/Dockerfile.dev index 153145a..00c20a1 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -28,7 +28,8 @@ ENV DEBUG_MODE on ENV zope_i18n_compile_mo_files= # Set chameleon cache directory ENV CHAMELEON_CACHE /app/var/cache - +# https://github.com/pypa/pip/issues/12079 +ENV _PIP_USE_IMPORTLIB_METADATA=0 # Expose Zope Port EXPOSE 8080