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.

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.

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

  1. Image
  2. Container

In this article, we will learn about Images.

What is Docker Image?

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

Docker Image for Novice
1.65 GEEK