great video about dockers:

https://www.youtube.com/watch?v=Tyy1BUEmhwg

Steps to build and run Docker

in general, the steps are:

Untitled

  1. develop the project (for a simple example, you can download an example of a node-express server from GitHub here )
  2. write Dockerfile and .dockerignore
FROM node:alpine

WORKDIR = /usr/app

COPY package.json .

RUN npm install

COPY . .

CMD [ "npm", "run", "start"]
  1. run the script to build the image with the command:
node_modules
Dockerfile
docker build -t express-app **.**
docker images

Untitled

Untitled

  1. after building the image, we can run it in order to build the container with the command: