Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -8
Dockerfile
CHANGED
|
@@ -1,21 +1,22 @@
|
|
| 1 |
-
# Use official Node.js image
|
| 2 |
FROM node:18-alpine
|
| 3 |
|
| 4 |
-
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
RUN apk add --no-cache git && \
|
| 9 |
-
git clone https://github.com/iib0011/omni-tools.git .
|
| 10 |
|
| 11 |
# Install dependencies
|
| 12 |
RUN npm install
|
| 13 |
|
| 14 |
-
# Expose the
|
| 15 |
EXPOSE 8080
|
| 16 |
|
| 17 |
-
# Set environment variable
|
| 18 |
ENV PORT=8080
|
|
|
|
| 19 |
|
| 20 |
-
# Run the
|
| 21 |
-
CMD ["npm", "run","--host", "
|
|
|
|
| 1 |
+
# Use official Node.js image
|
| 2 |
FROM node:18-alpine
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install git and clone the repository
|
| 8 |
RUN apk add --no-cache git && \
|
| 9 |
+
git clone https://github.com/iib0011/omni-tools.git .
|
| 10 |
|
| 11 |
# Install dependencies
|
| 12 |
RUN npm install
|
| 13 |
|
| 14 |
+
# Expose the desired port
|
| 15 |
EXPOSE 8080
|
| 16 |
|
| 17 |
+
# Set environment variable to change Vite's port
|
| 18 |
ENV PORT=8080
|
| 19 |
+
ENV HOST=0.0.0.0
|
| 20 |
|
| 21 |
+
# Run the Vite dev server and bind to all interfaces
|
| 22 |
+
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "8080"]
|