riddhiman commited on
Commit
06b59f8
·
verified ·
1 Parent(s): 728ac49

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -10
Dockerfile CHANGED
@@ -1,20 +1,20 @@
1
- # Use an official Node runtime as a parent image
2
- FROM node:20
3
 
4
- # Set the working directory inside the container to /app.
5
  WORKDIR /app
6
 
7
- # Copy the package.json and package-lock.json (if available) files into the container.
8
- COPY package.json package-lock.json* ./
9
 
10
- # Install the project dependencies.
11
- RUN npm install
12
 
13
- # Copy the rest of the application code into the container.
14
  COPY . .
15
 
16
- # Expose port 3000 to have it mapped by Docker daemon
17
  EXPOSE 7860
18
 
19
- # Command to run when starting the container
20
  CMD ["node", "server.js"]
 
1
+ # Use the official Node.js 16 image as a parent image
2
+ FROM node:16
3
 
4
+ # Set the working directory inside the container to /app
5
  WORKDIR /app
6
 
7
+ # Copy the package.json and package-lock.json (if available) to /app
8
+ COPY package*.json ./
9
 
10
+ # Install project dependencies inside the container
11
+ RUN npm install
12
 
13
+ # Copy the rest of your application's source code from your host to your image filesystem.
14
  COPY . .
15
 
16
+ # Make port 7860 available to the world outside this container
17
  EXPOSE 7860
18
 
19
+ # Command to run your app using Node.js
20
  CMD ["node", "server.js"]