From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Fri, 16 Jun 2023 16:10:08 +0000 (-0700) Subject: Experiment with a buildx cache mount for pip's directory. Does it increase image... X-Git-Tag: v1.16.2~1^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=328c87995b3130a45d2cc73872e3480869c5aaa5;p=thirdparty%2Fpaperless-ngx.git Experiment with a buildx cache mount for pip's directory. Does it increase image size? --- diff --git a/Dockerfile b/Dockerfile index 288593049d..43471f6a1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \