We will learn how to create docker image of Node.js app/service. There are lots of article already on this topic but they have lack of simplicity. When I went through them to create my first docker image. I realized they are complicated. But making a docker image of Node.js app is not as tough as it seems.
I am assuming that you already have knowledge of working in Node.js. Here I will not go through creating a Node.js project. You can refer this repo for code.
When you start learning Docker, two main terms come up
In this article, we will learn about Images.
A docker image is collection of files that bundle together all essentials (installations, application code and dependencies) required to configure a fully operational container environment. In simple words, it bundle all files necessary to run a container.
For creating docker image, docker needs a manual. This manual is called Dockerfile. Developer just needs to create this. Sounds cool!
Lets create a Dockerfile for our case.
#nodejs #docker #docker-beginner #docker-image #dockerfiles