Create a file in root directory of the project
Add in these contents
FROM node:14
WORKDIR /usr/src/app
RUN npm install
COPY . .
EXPOSE 8080
CMD ["node","index.js"]
Should look like
.dockerignore
file in the same directoryGo to the directory that has your Dockerfile and run the following command to build the Docker image. The -t flag lets you tag your image so it's easier to find later using the docker images command: