Prajith04 commited on
Commit
0c4f869
·
verified ·
1 Parent(s): bc5852e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -10
Dockerfile CHANGED
@@ -11,23 +11,16 @@ WORKDIR /app
11
  RUN npm install -g openclaw@latest
12
 
13
  # The 'node' user already exists with UID 1000 in this image.
14
- # We just need to give it ownership of the app directory.
15
  RUN chown -R node:node /app
16
 
17
  # Switch to the existing 'node' user
18
  USER node
 
19
  ENV HOME=/home/node
20
  ENV PATH=/home/node/.local/bin:$PATH
21
 
22
  # Expose the mandatory Hugging Face port
23
  EXPOSE 7860
24
 
25
- # Set environment variables for OpenClaw
26
- ENV OPENCLAW_GATEWAY_PORT=7860
27
- ENV OPENCLAW_GATEWAY_BIND=custom
28
- ENV OPENCLAW_GATEWAY_CUSTOM_BIND_HOST=0.0.0.0
29
-
30
- # Explicitly disable auth mode via ENV as well to be safe
31
- ENV OPENCLAW_GATEWAY_AUTH_MODE=none
32
- # Start OpenClaw and FORCE it to listen to the outside world
33
- CMD ["sh", "-c", "mkdir -p /home/node/.openclaw && printf '{gateway:{bind:\"custom\",customBindHost:\"0.0.0.0\",port:7860}}' > /home/node/.openclaw/config.json5 && cat /home/node/.openclaw/config.json5 && openclaw gateway run --allow-unconfigured --verbose"]
 
11
  RUN npm install -g openclaw@latest
12
 
13
  # The 'node' user already exists with UID 1000 in this image.
 
14
  RUN chown -R node:node /app
15
 
16
  # Switch to the existing 'node' user
17
  USER node
18
+
19
  ENV HOME=/home/node
20
  ENV PATH=/home/node/.local/bin:$PATH
21
 
22
  # Expose the mandatory Hugging Face port
23
  EXPOSE 7860
24
 
25
+ # Write config and start OpenClaw
26
+ CMD ["sh", "-c", "mkdir -p /home/node/.openclaw && echo '{\"gateway\":{\"bind\":\"custom\",\"customBindHost\":\"0.0.0.0\",\"port\":7860,\"controlUi\":{\"dangerouslyAllowHostHeaderOriginFallback\":true}}}' > /home/node/.openclaw/openclaw.json && openclaw gateway run --allow-unconfigured"]