File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ WORKDIR /app
99# Install dependencies based on the preferred package manager
1010COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
1111RUN \
12- if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
12+ if [ -f yarn.lock ]; then \
13+ corepack enable && corepack prepare
[email protected] --activate && \
14+ yarn config set nodeLinker node-modules && \
15+ yarn install --immutable; \
1316 elif [ -f package-lock.json ]; then npm ci; \
1417 elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
1518 else echo "Lockfile not found." && exit 1; \
@@ -28,7 +31,11 @@ COPY . .
2831# ENV NEXT_TELEMETRY_DISABLED 1
2932
3033RUN \
31- if [ -f yarn.lock ]; then yarn run build; \
34+ if [ -f yarn.lock ]; then \
35+ corepack enable && corepack prepare
[email protected] --activate && \
36+ yarn config set nodeLinker node-modules && \
37+ yarn install --immutable && \
38+ yarn run build; \
3239 elif [ -f package-lock.json ]; then npm run build; \
3340 elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
3441 else echo "Lockfile not found." && exit 1; \
You can’t perform that action at this time.
0 commit comments