Dockerizing a Node.js web app (Engine)
Dockerizing a Node.js web app
Note: - If you don’t like sudo then see Giving non-root access
The goal of this example is to show you how you can build your own Docker images from a parent image using a Dockerfile
. We will do that by making a simple Node.js hello world web application running on CentOS. You can get the full source code athttps://github.com/enokd/docker-node-hello/.
Create Node.js app
First, create a directory src
where all the files would live. Then create a package.json
file that describes your app and its dependencies:
{ "na