Prajith04 commited on
Commit
4da65f3
·
verified ·
1 Parent(s): 44f5fa4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile CHANGED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Node.js 22 (required for OpenClaw in 2026)
2
+ FROM node:22-bookworm-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
6
+
7
+ # Set working directory
8
+ WORKDIR /app
9
+
10
+ # Install OpenClaw globally
11
+ RUN npm install -g openclaw@latest
12
+
13
+ # Create a non-root user (Hugging Face requirement)
14
+ RUN useradd -m -u 1000 user
15
+ RUN chown -R user:user /app
16
+ USER user
17
+ ENV HOME=/home/user
18
+ ENV PATH=/home/user/.local/bin:$PATH
19
+
20
+ # Expose the mandatory Hugging Face port
21
+ EXPOSE 7860
22
+
23
+ # Set environment variables for OpenClaw
24
+ # We use 0.0.0.0 so the container can be reached by HF's proxy
25
+ ENV OPENCLAW_GATEWAY_PORT=7860
26
+ ENV OPENCLAW_GATEWAY_BIND=0.0.0.0
27
+
28
+ # Start OpenClaw with the 'allow-unconfigured' flag
29
+ # This lets the app start even without the manual terminal setup
30
+ CMD ["openclaw", "gateway", "run", "--allow-unconfigured"]