1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-04-08 14:14:00 +00:00

Dockerfile-workers: use cache mount for apt

Do it in the same way as is done in the main Dockerfile
This commit is contained in:
Andrew Ferrazzutti 2025-03-28 08:25:12 -04:00
parent bbfe1ece8e
commit 47e3a1043b

View file

@ -10,6 +10,10 @@ ARG PYTHON_VERSION=3.12
# each time.
FROM ghcr.io/astral-sh/uv:python${PYTHON_VERSION}-${DEBIAN_VERSION} AS deps_base
# Tell apt to keep downloaded package files, as we're using cache mounts.
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \