From fe16916c722e60a6aef1e7f22fc5b93fe9c1c1b3 Mon Sep 17 00:00:00 2001 From: riku6460 <17585784+riku6460@users.noreply.github.com> Date: Tue, 7 Nov 2023 05:49:29 +0900 Subject: [PATCH] =?UTF-8?q?Docker=20=E3=82=A4=E3=83=A1=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E6=99=82=E3=80=81package.json=20?= =?UTF-8?q?=E3=82=92=E3=82=B3=E3=83=94=E3=83=BC=E3=81=99=E3=82=8B=E5=89=8D?= =?UTF-8?q?=E3=81=AB=20pnpm=20fetch=20=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=20(MisskeyIO#217)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 64ebf8654f..bd08de841b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,15 +18,18 @@ RUN corepack enable WORKDIR /misskey -COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"] +COPY --link pnpm-lock.yaml ./ +RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \ + pnpm fetch + +COPY --link ["pnpm-workspace.yaml", "package.json", "./"] COPY --link ["scripts", "./scripts"] COPY --link ["packages/backend/package.json", "./packages/backend/"] COPY --link ["packages/frontend/package.json", "./packages/frontend/"] COPY --link ["packages/sw/package.json", "./packages/sw/"] COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"] -RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \ - pnpm i --frozen-lockfile --aggregate-output +RUN pnpm i --frozen-lockfile --aggregate-output --offline COPY --link . ./ @@ -48,12 +51,15 @@ RUN corepack enable WORKDIR /misskey -COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"] +COPY --link pnpm-lock.yaml ./ +RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \ + pnpm fetch + +COPY --link ["pnpm-workspace.yaml", "package.json", "./"] COPY --link ["scripts", "./scripts"] COPY --link ["packages/backend/package.json", "./packages/backend/"] -RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \ - pnpm i --frozen-lockfile --aggregate-output +RUN pnpm i --frozen-lockfile --aggregate-output --offline FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner