Yakova commited on
Commit
cc80e6b
·
verified ·
1 Parent(s): 44e7287

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -2
Dockerfile CHANGED
@@ -1,5 +1,10 @@
1
  FROM mbonea/whats-ramsey:0.0.4
2
 
 
 
 
 
 
3
 
4
  RUN npm install --no-cache
5
 
@@ -34,8 +39,18 @@ RUN npx playwright install
34
  RUN npm install -g http-server
35
 
36
 
37
- COPY . .
38
- # Ensure the start script has execute permissions
 
 
 
 
 
 
 
 
 
 
39
 
40
 
41
  # Expose the port your application runs on
 
1
  FROM mbonea/whats-ramsey:0.0.4
2
 
3
+ # Create a non-root user
4
+ RUN useradd -ms /bin/bash admin
5
+
6
+ # Set the working directory
7
+ WORKDIR /srv
8
 
9
  RUN npm install --no-cache
10
 
 
39
  RUN npm install -g http-server
40
 
41
 
42
+ # Copy the application code
43
+ COPY --chown=admin . /srv
44
+
45
+
46
+
47
+
48
+
49
+ # Give read and write permissions to the admin user
50
+
51
+ RUN chown -R admin:admin /srv
52
+ RUN chmod 755 /srv
53
+ USER admin
54
 
55
 
56
  # Expose the port your application runs on