Kulathuna23 commited on
Commit
d091598
·
verified ·
1 Parent(s): ed99812

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM quay.io/suhailtechinfo/suhail-v2
3
+
4
+ # Create the app directory with correct permissions
5
+ RUN mkdir -p /home/app && chown -R node:node /home/app
6
+
7
+ # Set the working directory
8
+ WORKDIR /home/app
9
+
10
+ # Copy the entire app directory into the container with the correct ownership
11
+ COPY --chown=node:node . .
12
+
13
+ # Install dependencies
14
+ RUN npm install || yarn install
15
+
16
+ # Create the start.sh script with the correct permissions
17
+ RUN echo '#!/bin/sh\nnpm start' > start.sh \
18
+ && chmod +x start.sh \
19
+ && chown node:node start.sh
20
+
21
+ # Switch to the 'node' user
22
+ USER node
23
+
24
+ # Expose the port
25
+ EXPOSE 7860
26
+
27
+ # Run the start.sh script
28
+ CMD ["sh", "start.sh"]