X Tutup
Skip to content

update -s script corrupts Yarn version #2411

@MikeMcC399

Description

@MikeMcC399

Environment

  • Platform: Ubuntu 24.04.4 LTS
  • Docker Version: N/A
  • Node.js Version: N/A
  • Image Tag: N/A

Expected Behavior

Executing

./update.sh -s

should "Update all images, skip updating Alpine and Yarn" and the help text displayed by

./update.sh -h

should be accurate.

Current Behavior

Executing

./update.sh -s

replaces

ENV YARN_VERSION=1.22.22

in each of the target directories, such as 25/trixie/Dockerfile with

ENV YARN_VERSION=0.0.0

Attempting to build a Docker image with this setting fails.

Possible Solution

  1. Preserve the original YARN_VERSION or
  2. Remove the -s option

In any case, ensure that the help text is accurate.

Although the help text in update.sh refers to Alpine, this part of the logic was been removed without changing the help text.

Considering that Yarn v1 Classic is frozen at 1.22.22 and bundling is scheduled for removal in images for Node.js >=26, there seems to be no need to retain this option.

Steps to Reproduce

git clone https://github.com/nodejs/docker-node
cd docker-node
./update.sh -s 25
git diff

shows every Dockerfile updated with

-ENV YARN_VERSION=1.22.22
+ENV YARN_VERSION=0.0.0

where no change should have been made.

Additional Information

61380fa (PR #2258)

  • removed code linking the -s option to alpine
  • removed code that preserved the existing Yarn version

git checkout cc626c1 # previous commit
./update.sh -s 24 # causes only NODE_VERSION to be updated
git checkout 61380fa
./update.sh -s 24 # causes NODE_VERSION to be updated and YARN_VERSION to be set to illegal 0.0.0 version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup