It has some functionality like npm.

It can install images from docker repositories like docker hub. Which is a bit like installing npm packages.

The difference is that npm packages are plain directories and files that live beside your app. The images also isolate your app from the rest of the OS, while providing general software (applications & libraries, not only JS packages) for your application to use.

Also one image could deliver basics of a Ubuntu system, then a Nginx image could extend that Ubuntu image with added libraries and Nginx preinstalled and then you would extend the Nginx image with the your html&css that the preinstalled Nginx should serve.


No it doesn't. NPM is a package manager, only to install some libraries. With Docker you are simulating a machine, installing software like Ubuntu dependencies and configuring your project.

code of conduct - report abuse