Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- 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 ["
|
|
|
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"]
|