File size: 532 Bytes
91f3d8e
 
 
8151130
 
 
91f3d8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use an official Node runtime as a parent image
FROM node:14

# Define environment variable
ENV NAME=World

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json
COPY package*.json /usr/src/app/
COPY server.js /usr/src/app/
# Install any needed packages
RUN npm install && npm audit fix
# Bundle app source inside the Docker image
COPY . .

# Make port available to the world outside this container
EXPOSE 8080

# Run app when the container launches
CMD ["node", "server.js"]