diff --git a/Dockerfile b/Dockerfile index 7376bbb5..ffaeaff3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -297,6 +297,9 @@ RUN --mount=type=tmpfs,target=/cache \ --mount=type=cache,id=apt-cache-cache,sharing=locked,target=/var/cache/apt \ --mount=type=bind,source=Pipfile,target=/app/Pipfile \ set -x && \ + # Remove __pycache__ directories from the image + PYTHONPYCACHEPREFIX=/cache/pycache && \ + export PYTHONPYCACHEPREFIX && \ # Update from the network and keep cache rm -f /etc/apt/apt.conf.d/docker-clean && \ apt-get update && \