Update Dockerfile
Browse files- Dockerfile +10 -12
Dockerfile
CHANGED
|
@@ -1,18 +1,16 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
USER root
|
| 5 |
-
RUN apt-get update && apt-get install -y git python3 make g++ && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
WORKDIR /home/node/app
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
RUN npm install
|
| 13 |
|
| 14 |
-
# Expose Hugging Face's mandatory routing port
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
CMD ["
|
|
|
|
| 1 |
+
# Use standard Node 18 image which already has npm ready
|
| 2 |
+
FROM node:18-alpine
|
| 3 |
|
| 4 |
+
WORKDIR /app
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
# Directly download the official pre-compiled codebase release
|
| 7 |
+
RUN npx degit openclaw/openclaw#main /app
|
|
|
|
| 8 |
|
| 9 |
+
# Install production dependencies only, bypassing heavy dev compiler pipelines
|
| 10 |
+
RUN npm install --omit=dev --no-audit --no-fund
|
| 11 |
|
| 12 |
+
# Expose Hugging Face's mandatory web routing port
|
| 13 |
EXPOSE 7860
|
| 14 |
|
| 15 |
+
# Run the pre-bundled production dashboard gateway
|
| 16 |
+
CMD ["npx", "openclaw", "gateway", "--port", "7860"]
|