Skip to content

Add Corepack and Pre-install Yarn for Node.js 18, 20, and 22 Images #2602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Saipriya-1144
Copy link
Collaborator

@Saipriya-1144 Saipriya-1144 commented Jun 26, 2025

Corepack has been installed, and Yarn version 1.22.15 has been pre-installed for Node.js 18 and 20 images using Corepack. For node 22 latest stable yarn version is being used.

If a customer specifies a different Yarn version in the packageManager field of their package.json, Corepack will automatically install and use that specified version.

  • The purpose of this PR is explained in this message or in an issue. If an issue please include a reference as #<issue_number>.
  • Tests are included and/or updated for code changes.
  • Proper license headers are included in each file.

@Saipriya-1144 Saipriya-1144 requested a review from a team as a code owner June 26, 2025 09:02
@Saipriya-1144 Saipriya-1144 requested a review from Copilot June 26, 2025 09:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Node.js Docker images to use Corepack for managing Yarn and removes the legacy manual Yarn installation. In addition, it updates the artifact download URLs in the runtime images build script.

  • Added Corepack enablement and Yarn pre-install commands for Node.js 18, 20, and 22 images.
  • Removed manual Yarn tarball extraction from the common base image.
  • Updated download endpoints in build_runtime_images.sh to a new CDN.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
images/runtime/node/22/bullseye.Dockerfile Added Corepack enable and Yarn pre-installation for Node 22 Bullseye image.
images/runtime/node/22/bookworm.Dockerfile Added Corepack enable and Yarn pre-installation for Node 22 Bookworm image.
images/runtime/node/20/bullseye.Dockerfile Added Corepack enable and Yarn pre-installation with Yarn 1.22.15 for Node 20 Bullseye image.
images/runtime/node/20/bookworm.Dockerfile Added Corepack enable and Yarn pre-installation with Yarn 1.22.15 for Node 20 Bookworm image.
images/runtime/node/18/bullseye.Dockerfile Added Corepack enable and Yarn pre-installation with Yarn 1.22.15 for Node 18 Bullseye image.
images/runtime/commonbase/nodeRuntimeBase.Dockerfile Removed manual Yarn installation logic in favor of Corepack.
images/runtime/build_runtime_images.sh Updated download URLs to use the new CDN endpoints.

@Saipriya-1144 Saipriya-1144 force-pushed the user/vchintalapat/activate-yarn-using-corepack branch from e72526d to 7adca8b Compare June 27, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant