From 64cffd2d68b3b3888078bf4a74c513c83df451ae Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 17 Nov 2023 00:21:59 +0100 Subject: [PATCH] [docker] Build with immutable lockfile and cache --- .forgejo/workflows/test-build.yaml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/test-build.yaml b/.forgejo/workflows/test-build.yaml index cfa8d2c67..e45aa8f1c 100644 --- a/.forgejo/workflows/test-build.yaml +++ b/.forgejo/workflows/test-build.yaml @@ -20,7 +20,7 @@ jobs: run: | cd /iceshrimp cp -Tr /iceshrimp-caches/yarn .yarn - yarn + yarn --immutable --immutable-cache rm -rf /iceshrimp-caches/yarn/* && cp -Tr .yarn /iceshrimp-caches/yarn - name: Build the shrimp run: | diff --git a/Dockerfile b/Dockerfile index cf78a647d..69fc49efb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY . ./ RUN --mount=type=cache,target=/iceshrimp/.yarncache cp -Tr .yarncache .yarn # Configure corepack and install dev mode dependencies for compilation -RUN corepack enable && corepack prepare --activate && yarn +RUN corepack enable && corepack prepare --activate && yarn --immutable --immutable-cache # Save yarn cache RUN --mount=type=cache,target=/iceshrimp/.yarncache rm -rf .yarncache/* && cp -Tr .yarn .yarncache