Skip to content
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

Add support for multiple Node.js version #71

Closed
razonyang opened this issue May 29, 2024 · 4 comments
Closed

Add support for multiple Node.js version #71

razonyang opened this issue May 29, 2024 · 4 comments

Comments

@razonyang
Copy link
Member

No description provided.

@jerrychan7
Copy link

Why not just build in nvm to let users decide which version of node.js to install?
By default, the latest LTS version is installed in the image using nvm, while user determines other versions when the image running.

@razonyang
Copy link
Member Author

razonyang commented Sep 26, 2024

If I understand correctly, the nvm installs Node.js in the container runtime (exectue inside container) if users want to use a particular version.

If so, reinstallation is required every time the container is started, which takes time.

This proposal is about creating tags for each Node.js version, that is, there will only be one version of Node.js installed per tag out-of-box, but there is no plan to implement it, I may be overthinking it, the latest and LTS versions are sufficient for most cases.

@jerrychan7
Copy link

@razonyang
Yes, you understand correctly, users need to install specific versions themselves.
In my opinion, there are many node versions, and non-LTS or non-latest versions are never the mainstream requirements. You can avoid more builds by providing them with an option.

If many people have this requirement, they can choose to build a downstream package to use a specific node version, instead of doing everything in one package. For example, users can use similar commands to package their own images:

FROM hugomods/hugo:exts as hugo

RUN nvm install 18.0.0;
  && nvm use 18.0.0

@razonyang
Copy link
Member Author

In my opinion, there are many node versions

Indeed, but I'm just going to create tags for the major version of Node.js.

The proposal doesn't seem very useful at the moment, users can create their own image, and nvm won't be included into the image, users can easily install it with an extra RUN instruction.

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

No branches or pull requests

2 participants