Fix Docker build for Yarn v4

- Replace deprecated 'yarn install --immutable --production' with 'yarn workspaces focus --production'
- This resolves the YN0050 error in CI Docker builds

Yarn v4 deprecated the --production flag on install command.
This commit is contained in:
Damir Mukimov 2025-11-30 15:37:52 +01:00
parent ca75d868c6
commit 5fb9a1a1af
No known key found for this signature in database
GPG Key ID: 42996CC7C73BC750

View File

@ -36,7 +36,7 @@ WORKDIR /app
COPY .yarnrc.yml package.json yarn.lock ./ COPY .yarnrc.yml package.json yarn.lock ./
# Install production dependencies (uses PnP) # Install production dependencies (uses PnP)
RUN yarn install --immutable --production RUN yarn workspaces focus --production
# Copy PnP files and built application from builder stage # Copy PnP files and built application from builder stage
COPY --from=builder --chown=nextjs:nodejs /app/.pnp.cjs /app/.pnp.loader.mjs ./ COPY --from=builder --chown=nextjs:nodejs /app/.pnp.cjs /app/.pnp.loader.mjs ./