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
|
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 ["scripts", "./scripts"]
|
||||||
COPY --link ["packages/backend/package.json", "./packages/backend/"]
|
COPY --link ["packages/backend/package.json", "./packages/backend/"]
|
||||||
COPY --link ["packages/frontend/package.json", "./packages/frontend/"]
|
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 --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
RUN pnpm i --frozen-lockfile --aggregate-output --offline
|
||||||
pnpm i --frozen-lockfile --aggregate-output
|
|
||||||
|
|
||||||
COPY --link . ./
|
COPY --link . ./
|
||||||
|
|
||||||
|
@ -48,12 +51,15 @@ RUN corepack enable
|
||||||
|
|
||||||
WORKDIR /misskey
|
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 ["scripts", "./scripts"]
|
||||||
COPY --link ["packages/backend/package.json", "./packages/backend/"]
|
COPY --link ["packages/backend/package.json", "./packages/backend/"]
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
RUN pnpm i --frozen-lockfile --aggregate-output --offline
|
||||||
pnpm i --frozen-lockfile --aggregate-output
|
|
||||||
|
|
||||||
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
|
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue