EdgeAIG commited on
Commit
3cd2718
·
verified ·
1 Parent(s): 292d7f9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -12
Dockerfile CHANGED
@@ -1,18 +1,16 @@
1
- FROM node:18-slim
 
2
 
3
- # Install system dependencies required for native node-gyp compilation
4
- USER root
5
- RUN apt-get update && apt-get install -y git python3 make g++ && rm -rf /var/lib/apt/lists/*
6
 
7
- # Switch back to the standard application user
8
- USER node
9
- WORKDIR /home/node/app
10
 
11
- # Force an explicit, local isolated deployment to run native compiler scripts safely
12
- RUN npm install openclaw@latest --omit=dev
13
 
14
- # Expose Hugging Face's mandatory routing port
15
  EXPOSE 7860
16
 
17
- # Point execution directly to the locally isolated binary folder
18
- CMD ["./node_modules/.bin/openclaw", "gateway", "--port", "7860"]
 
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"]