Mahfujul commited on
Commit
0c4eddf
1 Parent(s): e09d1ec

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -1
Dockerfile CHANGED
@@ -18,8 +18,12 @@ RUN npm install
18
  # Copy the rest of the application code
19
  COPY . .
20
 
 
 
 
 
21
  # Expose any necessary ports
22
  EXPOSE 7860
23
 
24
  # Command to run the application
25
- CMD ["npm", "start", "--host", "0.0.0.0", "--port", "7860"]
 
18
  # Copy the rest of the application code
19
  COPY . .
20
 
21
+ # Copy the script to obtain IP address and set it as an environment variable
22
+ COPY get_ip.sh /code/get_ip.sh
23
+ RUN chmod +x /code/get_ip.sh
24
+
25
  # Expose any necessary ports
26
  EXPOSE 7860
27
 
28
  # Command to run the application
29
+ CMD ["sh", "-c", "/code/get_ip.sh && npm start --host $CONTAINER_IP --port 7860"]