Docker イメージビルド時の pnpm i 後に pnpm rebuild を実行するように (MisskeyIO#317)

This commit is contained in:
riku6460 2024-01-05 05:49:20 +09:00 committed by GitHub
parent 2227d4a902
commit c51764124d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -20,7 +20,7 @@ WORKDIR /misskey
COPY --link pnpm-lock.yaml ./ COPY --link pnpm-lock.yaml ./
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \ RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm fetch pnpm fetch --ignore-scripts
COPY --link ["pnpm-workspace.yaml", "package.json", "./"] COPY --link ["pnpm-workspace.yaml", "package.json", "./"]
COPY --link ["scripts", "./scripts"] COPY --link ["scripts", "./scripts"]
@ -29,7 +29,8 @@ COPY --link ["packages/frontend/package.json", "./packages/frontend/"]
COPY --link ["packages/sw/package.json", "./packages/sw/"] COPY --link ["packages/sw/package.json", "./packages/sw/"]
COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"] COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"]
RUN pnpm i --frozen-lockfile --aggregate-output --offline RUN pnpm i --frozen-lockfile --aggregate-output --offline \
&& pnpm rebuild -r
COPY --link . ./ COPY --link . ./
@ -53,14 +54,15 @@ WORKDIR /misskey
COPY --link pnpm-lock.yaml ./ COPY --link pnpm-lock.yaml ./
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \ RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm fetch pnpm fetch --ignore-scripts
COPY --link ["pnpm-workspace.yaml", "package.json", "./"] COPY --link ["pnpm-workspace.yaml", "package.json", "./"]
COPY --link ["scripts", "./scripts"] COPY --link ["scripts", "./scripts"]
COPY --link ["packages/backend/package.json", "./packages/backend/"] COPY --link ["packages/backend/package.json", "./packages/backend/"]
COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"] COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"]
RUN pnpm i --frozen-lockfile --aggregate-output --offline RUN pnpm i --frozen-lockfile --aggregate-output --offline \
&& pnpm rebuild -r
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner