ka1kuk commited on
Commit
8660943
1 Parent(s): a428239

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -9
Dockerfile CHANGED
@@ -1,15 +1,18 @@
1
- FROM node:latest
 
2
 
3
- # Create app directory
4
  WORKDIR /usr/src/app
5
 
6
- # Install app dependencies
7
- COPY package*.json ./
 
 
 
8
  RUN npm install
9
 
10
- # Bundle app source
11
- COPY . .
12
 
13
- # Expose port and start application
14
- EXPOSE 8080
15
- CMD [ "node", "server.js" ]
 
1
+ # Use the official Node.js 14 image.
2
+ FROM node:14
3
 
4
+ # Create and change to the app directory.
5
  WORKDIR /usr/src/app
6
 
7
+ # Copy application dependency manifests to the container image.
8
+ COPY package.json ./
9
+ COPY package-lock.json ./
10
+
11
+ # Install production dependencies.
12
  RUN npm install
13
 
14
+ # Copy local code to the container image.
15
+ COPY . ./
16
 
17
+ # Run the web service on container startup.
18
+ CMD [ "npm", "server" ]