node.jsdockerubuntucontainers

NodeJs on an Ubuntu docker container?


I am moving my windows hosted SPA app into a Linux container. I am somewhat familiar with Ubuntu, so I was going to use that.

The NodeJs page on docker hub shows containers for several Debian versions and Alpine.

But nothing for Ubuntu.

Is Ubuntu not recommended for use with NodeJs by the NodeJs Team?

Or is it just too much work to keep lots of Linux distros of NodeJs preped, so the Node team stopped at Debian and Alpine?

Or is there some other reason?....


Solution

  • Ubuntu is too heavy to have it as a base container for running a node application as a server. Debian and Alpine are much more lightweight compared to Ubuntu.

    Just on top of that, having some knowledge of Ubuntu, debian and alpine wouldn't be a big change. At the end of the day Ubuntu is somewhat built on top of debian, and they're linux distros so you should be fine. Especially that you'd need to do your configure steps ones, save them as part of the container image and you're done. Every time it will make the same container with the right setup. The beauty of containers.