I'm looking to install nodejs via Dockerfile to a debian based container. I'm a little confused about the different distributions out there. I've come to the conclusion that I want the latest STABLE distribution.
Now, in nodesource/distributions#deb there are four different distributions (v0.10, v0.12, v4.x, v5.x). As far as I understand, I need v5.x (by reading this blog post, among other random stuff I googled). But everywhere I look for, people recommend to install v0.12 (which also is the latest stable, or LTS, I'm not sure) even though in the nodejs.com official site distributions the release is as of this time v5.0.0.
So, I've got 2 possible ways of installing, any help (please elaborate a little bit, maybe this is a dumb question but it is kind of confusing to me)
curl -sL https://deb.nodesource.com/setup_5.x | bash -
apt-get install -y nodejs
or
curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install -y nodejs
LTS stands for Long Term Support and the recommended version for most users. Nodejs org makes new versions frequently with new features, bug fixes, and performance optimizations. As a general rule, we can safely assume that the latest version is always the best version to use.
The LTS version is commonly recommended for most users. In Node. js, new versions frequently come with more features, optimized performance, and bug fixes.
You should definitely not use any of the v0.x versions of Node.js as support for them are set to expire in 2016.
You should use either v4 (code name argon
) which is the next LTS (long term support) version of Node.js or v5 which is the latest stable version.
Also, Node.js has an official Docker Image:
FROM node:5
I'm new to node.js/npm and was confused by this as well. I'm installing on CentOS 7 using "yum install nodejs"
yum installs a 0.10 version of node.js
Then, when I npm installed another module, I saw some warning saying it wanted node.js >= 0.12... which led me to believe I needed v0.12... (Duh, 5.3.0 >= 0.12, but I was confused and scared at the time)
So google brought me to this question, and I followed Michaels advice.
I went and read the change log as suggested in his comment, and it's pretty clear that the version numbers are sequential, they just have some big jumps in a short amount of time:
v0.10.39 : 2015-06-18
...
v0.12.7 : 2015-07-09
...
v3.0.0 : 2015-08-04
...
v4.1.0 : 2015-09-17
...
v5.3.0 : 2015-12-16
Hope that helped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With