EdgeAIG commited on
Commit
292d7f9
·
verified ·
1 Parent(s): 474a3a3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -12
Dockerfile CHANGED
@@ -1,23 +1,18 @@
1
- # Use an explicit Node user build to bypass the root permission block
2
  FROM node:18-slim
3
 
4
- # Set up required system packages safely
5
  USER root
6
  RUN apt-get update && apt-get install -y git python3 make g++ && rm -rf /var/lib/apt/lists/*
7
 
8
- # Set up a secure global npm folder that doesn't require root privileges
9
- ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
10
- ENV PATH=$PATH:/home/node/.npm-global/bin
11
-
12
- # Switch to the default non-root user that Hugging Face expects
13
  USER node
14
  WORKDIR /home/node/app
15
 
16
- # Install the verified production release of the application
17
- RUN npm install -g openclaw@latest
18
 
19
- # Expose the mandatory Hugging Face web-routing port
20
  EXPOSE 7860
21
 
22
- # Start the engine gateway on Hugging Face's exact port assignment
23
- CMD ["openclaw", "gateway", "--port", "7860"]
 
 
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"]