In Dockerfile how to add multiple nodejs versions

In Dockerfile how to add multiple nodejs versions.

To get the correct nodejs version from the custom image how to configure on dockerfile.
nodejs Current version - 19
nodejs latest version - 20

please help me here how to integrate changes on jenkinsfile & dockerfile


Hi there,

“please help me” is hard to help without more information. Try to always include these 3 things.

  1. what did you try? (Code samples, command lines, screenshots, videos, etc)
  2. what did happen? (Error messages, description, outputs, stuff)
  3. what did you expect to happen?

Otherwise, it’s hard for us to get into your context and you’ll have to have someone who is exactly knowledgeable come along.

You might consider the following blog post about running multiple versions of node with the nvm command:

There is also a stackoverflow article that may be helpful.