mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-27 14:28:49 +09:00
Docker イメージビルド時、package.json をコピーする前に pnpm fetch するように (MisskeyIO#217)
This commit is contained in:
parent
825e99e46d
commit
fe16916c72
18
Dockerfile
18
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user