Mahfujul commited on
Commit
665210b
1 Parent(s): a94ca4d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -22
Dockerfile CHANGED
@@ -9,31 +9,13 @@ ENV TOKEN=MTAyOTExOTAzMzEwODM0NDg0Mw.GHRuSg.UJGFPx7vbUBU23sHWzUPastwQXwsi1aWZnKj
9
  # Set the working directory
10
  WORKDIR /code
11
 
12
- # Create a temporary directory
13
- RUN mkdir /tmp/code
 
14
 
15
- # Copy package.json and package-lock.json to the temporary directory
16
- COPY package*.json /tmp/code/
17
-
18
- # Change ownership of the files to allow npm install
19
- RUN chown -R node:node /tmp/code
20
-
21
- # Switch to the node user
22
- USER node
23
-
24
- # Install dependencies in the temporary directory
25
- RUN npm install --prefix /tmp/code
26
-
27
- # Switch back to the root user
28
- USER root
29
-
30
- # Copy the rest of the application code to the working directory
31
  COPY . .
32
 
33
- # Copy dependencies from the temporary directory to the working directory
34
- RUN cp -a /tmp/code/node_modules /code/
35
-
36
-
37
  # Expose any necessary ports
38
  EXPOSE 7860
39
 
 
9
  # Set the working directory
10
  WORKDIR /code
11
 
12
+ # Copy package.json and install dependencies
13
+ COPY package.json ./
14
+ RUN npm install
15
 
16
+ # Copy the rest of the application code
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  COPY . .
18
 
 
 
 
 
19
  # Expose any necessary ports
20
  EXPOSE 7860
21