Skip to content

Commit 167661f

Browse files
cursoragentmsukkari
andcommitted
fix(docker): lock shared BuildKit yarn cache mounts
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
1 parent 9236902 commit 167661f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ COPY ./packages/schemas ./packages/schemas
4444
COPY ./packages/shared ./packages/shared
4545
COPY ./packages/queryLanguage ./packages/queryLanguage
4646

47-
RUN --mount=type=cache,id=sourcebot-yarn-cache,target=/app/.yarn/cache \
47+
RUN --mount=type=cache,id=sourcebot-yarn-cache,sharing=locked,target=/app/.yarn/cache \
4848
yarn workspace @sourcebot/db install
49-
RUN --mount=type=cache,id=sourcebot-yarn-cache,target=/app/.yarn/cache \
49+
RUN --mount=type=cache,id=sourcebot-yarn-cache,sharing=locked,target=/app/.yarn/cache \
5050
yarn workspace @sourcebot/schemas install
51-
RUN --mount=type=cache,id=sourcebot-yarn-cache,target=/app/.yarn/cache \
51+
RUN --mount=type=cache,id=sourcebot-yarn-cache,sharing=locked,target=/app/.yarn/cache \
5252
yarn workspace @sourcebot/shared install
53-
RUN --mount=type=cache,id=sourcebot-yarn-cache,target=/app/.yarn/cache \
53+
RUN --mount=type=cache,id=sourcebot-yarn-cache,sharing=locked,target=/app/.yarn/cache \
5454
yarn workspace @sourcebot/query-language install
5555
# ------------------------------------
5656

@@ -97,7 +97,7 @@ COPY --from=shared-libs-builder /app/packages/shared ./packages/shared
9797
COPY --from=shared-libs-builder /app/packages/queryLanguage ./packages/queryLanguage
9898

9999
# Fixes arm64 timeouts
100-
RUN --mount=type=cache,id=sourcebot-yarn-cache,target=/app/.yarn/cache \
100+
RUN --mount=type=cache,id=sourcebot-yarn-cache,sharing=locked,target=/app/.yarn/cache \
101101
yarn workspace @sourcebot/web install
102102

103103
ENV NEXT_TELEMETRY_DISABLED=1
@@ -135,7 +135,7 @@ COPY --from=shared-libs-builder /app/packages/db ./packages/db
135135
COPY --from=shared-libs-builder /app/packages/schemas ./packages/schemas
136136
COPY --from=shared-libs-builder /app/packages/shared ./packages/shared
137137
COPY --from=shared-libs-builder /app/packages/queryLanguage ./packages/queryLanguage
138-
RUN --mount=type=cache,id=sourcebot-yarn-cache,target=/app/.yarn/cache \
138+
RUN --mount=type=cache,id=sourcebot-yarn-cache,sharing=locked,target=/app/.yarn/cache \
139139
yarn workspace @sourcebot/backend install
140140
RUN yarn workspace @sourcebot/backend build
141141

0 commit comments

Comments
 (0)