From 23f88551894d1ec51dd881a0d8bf09a9b3557721 Mon Sep 17 00:00:00 2001 From: Andrew Fischer Date: Mon, 6 Oct 2025 14:16:33 -0700 Subject: [PATCH] fix: use cache mount for yarn to prevent disk space exhaustion Excludes yarn cache from Docker image layers by using BuildKit cache mounts. This prevents "no space left on device" errors during CI builds while maintaining fast build times through persistent cache between runs. Ticket: VL-3537 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c9fde2693e..18c28414dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,8 @@ RUN apt-get update && apt-get install -y git python3 make g++ libtool autoconf a WORKDIR /tmp/bitgo COPY --from=filter-packages-json /tmp/bitgo . # (skip postinstall) https://github.com/yarnpkg/yarn/issues/4100#issuecomment-388944260 -RUN NOYARNPOSTINSTALL=1 yarn install --pure-lockfile --network-timeout 120000 +RUN --mount=type=cache,target=/usr/local/share/.cache/yarn \ + NOYARNPOSTINSTALL=1 yarn install --pure-lockfile --network-timeout 120000 COPY . . RUN \