Yakova commited on
Commit
8267dd9
·
verified ·
1 Parent(s): f108883

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -16
Dockerfile CHANGED
@@ -1,8 +1,5 @@
1
  FROM mbonea/whats-ramsey:latest
2
 
3
- # Create a non-root user
4
- RUN useradd -ms /bin/bash admin
5
-
6
  WORKDIR /usr/src/app
7
 
8
  # Install necessary packages for Puppeteer
@@ -34,23 +31,14 @@ RUN npm install --no-cache
34
 
35
  RUN npm install -g http-server
36
 
37
- # Create the directory for whatsapp sessions and set permissions
38
- # RUN mkdir -p /usr/src/app/.wwebjs_auth/session-whatsapp_client
39
- # RUN chown -R admin:admin /usr/src/app/.wwebjs_auth
40
- RUN chmod -R 777 /usr/src/app/
41
-
42
  # Copy the application code
43
- COPY --chown=admin . /usr/src/app
44
-
45
- # Set permissions for the entire app directory
46
- RUN chown -R admin:admin /usr/src/app
47
- RUN chmod -R 755 /usr/src/app
48
 
49
- # Switch to admin user
50
- USER admin
51
 
52
  # Expose the port your application runs on
53
  EXPOSE 7860
54
 
55
  # Define the command to run the start script
56
- CMD npm start
 
1
  FROM mbonea/whats-ramsey:latest
2
 
 
 
 
3
  WORKDIR /usr/src/app
4
 
5
  # Install necessary packages for Puppeteer
 
31
 
32
  RUN npm install -g http-server
33
 
 
 
 
 
 
34
  # Copy the application code
35
+ COPY . /usr/src/app/
 
 
 
 
36
 
37
+ # Create directory and set permissions
38
+ RUN chmod -R 777 /usr/src/app
39
 
40
  # Expose the port your application runs on
41
  EXPOSE 7860
42
 
43
  # Define the command to run the start script
44
+ CMD ["npm", "start"]