Skip to content

Conversation

@nate-nexthop
Copy link
Contributor

@nate-nexthop nate-nexthop commented Nov 12, 2025

Why I did it

We are attempting to install nodejs 14 from nodesource.com using this line in the Dockerfile:

-RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -

However, this script is deprecated and because of this the script inserts artificial pauses so the user can heed their warning:

================================================================================

                              DEPRECATION WARNING

  Node.js 14.x is no longer actively supported!
  <snip>
Continuing in 20 seconds ...


================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================

                           SCRIPT DEPRECATION WARNING


  This script, located at https://deb.nodesource.com/setup_X, used to
  install Node.js is deprecated now and will eventually be made inactive.
<snip>
TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...

We need to stop using this script before it goes away as that will break builds. As it it, it wastes time.

Additionally, Bookworm has a Debian maintained nodejs, v18, which ends up being installed anyway because the sources added from nodesource.com are older.

Work item tracking
  • Microsoft ADO (number only):

fixes #24516

How I did it

Just remove the line to add the nodesource.com APT sources.

How to verify it

Enter the sonic-slave-bash container before and after this change, and verify that the nodejs installed is v18:
Before:

Checking sonic-slave-user image: sonic-slave-bookworm-admin:fde86dbe366
admin@3ee74e91ba03:/sonic$ node -v
v18.20.4

After:

Checking sonic-slave-user image: sonic-slave-bookworm-admin:2d1524f8df4
admin@23cef98ccbd2:/sonic$ node -v
v18.20.4

Which release branch to backport (provide reason below if selected)

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Tested branch (Please provide the tested image version)

master

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Debian Bookworm already has a nodejs that is newer than the
nodesource.com version 14 that the Dockerfile is currently installing.
Bookworm has nodejs 18.

Because of this, we run the script (curl | bash) from nodesource.com for
nodejs 14 which makes the process wait for 80 seconds because the script
is deprecated. Then when we actually install nodejs, we get the version
from Bookworm's repositories instead of nodesource.com anyway. This
makes the process of using nodesource.com wasteful and pointless.

The easy fix is to just remove this line where we add the nodesource
repo.
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nate-nexthop nate-nexthop changed the title TEST commit: Try to remove nodesource nodejs sources [build] Remove deprecated nodesource.com nodejs source from Bookworm slave container Dockerfile Nov 14, 2025
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.

Bug: arm(hf/64) docker-slave containers are using old nodejs versions via a deprecated install script

2 participants