<filename>Dockerfile
## Mandatory command
## Download node image with alpine version (simplified and lighter version)
FROM node:alpine

## Defines the location where the app will stay on the container's disk
## It can be the directory you want
WORKDIR /usr/app

## Copies everything that starts with package and ends with .json into the /usr/app folder
COPY package*.json ./

## Run npm install to add dependencies and create node_modules folder
RUN npm install

## Copy everything in the directory where the Dockerfile file is
## Into the container's /usr/app folder
## Let's ignore node_modules so we'll create a .dockerignore
COPY . .

## Container listens for access at port 3000
EXPOSE 3000

## Do not repeat in Dockerfile
## Run the npm start command to start the script that is in package.json
CMD npm start
