hprasath commited on
Commit
04a901a
1 Parent(s): 073fac9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -1,15 +1,15 @@
1
- FROM node:16
 
2
 
3
  # Set working directory
4
  WORKDIR /code
5
 
6
- # Copy Node.js application files
7
- COPY ./index.js /code/index.js
8
- COPY ./package.json /code/package.json
9
- COPY ./package-lock.json /code/package-lock.json
10
 
11
- # Install Node.js dependencies
12
- RUN npm install
13
 
14
  # Expose port
15
  EXPOSE 7860
 
1
+ # Use a specific version of the node image
2
+ FROM node:16-alpine
3
 
4
  # Set working directory
5
  WORKDIR /code
6
 
7
+ # Copy package.json and package-lock.json and install dependencies
8
+ COPY package*.json ./
9
+ RUN npm install --production
 
10
 
11
+ # Copy the rest of the application files
12
+ COPY . .
13
 
14
  # Expose port
15
  EXPOSE 7860