]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Experiment with a buildx cache mount for pip's directory. Does it increase image...
authorTrenton H <797416+stumpylog@users.noreply.github.com>
Fri, 16 Jun 2023 16:10:08 +0000 (09:10 -0700)
committerTrenton H <797416+stumpylog@users.noreply.github.com>
Sun, 18 Jun 2023 03:13:38 +0000 (20:13 -0700)
Dockerfile

index 288593049d98d1749a2c057375451f83c39004a0..43471f6a1e1bab9de4c1fc8768c785ec6e94d9ac 100644 (file)
@@ -1,4 +1,4 @@
-# syntax=docker/dockerfile:1.4
+# syntax=docker/dockerfile:1
 # https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md
 
 # Stage: compile-frontend
@@ -216,13 +216,15 @@ ARG BUILD_PACKAGES="\
   git \
   default-libmysqlclient-dev"
 
-RUN set -eux \
+# hadolint ignore=DL3042
+RUN --mount=type=cache,target=/root/.cache/pip/,id=pip-cache \
+  set -eux \
   && echo "Installing build system packages" \
     && apt-get update \
     && apt-get install --yes --quiet --no-install-recommends ${BUILD_PACKAGES} \
     && python3 -m pip install --no-cache-dir --upgrade wheel \
   && echo "Installing Python requirements" \
-    && python3 -m pip install --default-timeout=1000 --no-cache-dir --requirement requirements.txt \
+    && python3 -m pip install --default-timeout=1000 --requirement requirements.txt \
   && echo "Installing NLTK data" \
     && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" snowball_data \
     && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" stopwords \