Skip to content

Commit 910347e

Browse files
committed
fix(docs): copy .yarn in dockerfile
1 parent f9d4356 commit 910347e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ FROM node:18-slim AS base
55
FROM base AS deps
66
WORKDIR /app
77

8-
# Copy the lockfiles and package.json from docs directory
8+
# Copy package manifest and lockfiles from docs directory
9+
# Also copy Yarn config to ensure node_modules linker (not PnP)
910
COPY docs/package.json docs/yarn.lock* docs/package-lock.json* docs/pnpm-lock.yaml* ./
11+
COPY docs/.yarnrc.yml ./
12+
COPY docs/.yarn/ ./.yarn/
1013
RUN \
11-
if [ -f yarn.lock ]; then corepack enable && yarn install --immutable; \
14+
if [ -f yarn.lock ]; then corepack enable && yarn config set nodeLinker node-modules && yarn install --immutable; \
1215
elif [ -f package-lock.json ]; then npm ci; \
1316
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
1417
else echo "Lockfile not found." && exit 1; \

0 commit comments

Comments
 (0)