# Use an official Node runtime as the parent image
FROM node:14
# Set the working directory in the container to /app
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install any needed packages specified in package.json
RUN npm install
# Bundle app source inside the docker image
COPY . .
# Make port 3000 available to the world outside this container
EXPOSE 3000
# Define the command to run the app
CMD [ "npm", "start" ]
CREATE Dockerfile
CREATE docker-compose.yml
Instructions:
docker build -t simple-test .
in your terminal.docker run -p 3000:3000 simple-test
.docker-compose up
in your terminal.http://localhost:3000
to view the app.