Spaces:
Running
Running
File size: 1,179 Bytes
9707397 268d142 e735f99 9707397 278e30d e735f99 1a8d9b3 e735f99 9707397 1481daf 1a8d9b3 9707397 1a8d9b3 e735f99 1fc3006 921a53b 1a8d9b3 0849fcd 1a8d9b3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # Using Node 22 Bookworm
FROM node:22-bookworm
# 1. Install build dependencies as root
USER root
RUN apt-get update && apt-get install -y \
cmake \
build-essential \
python3 \
&& rm -rf /var/lib/apt/lists/*
# 2. Use existing 'node' user
RUN mkdir -p /home/node/app /home/node/.openclaw && \
chown -R node:node /home/node/app /home/node/.openclaw
# 3. Switch to the 'node' user
USER node
ENV HOME=/home/node \
PATH=/home/node/.local/bin:$PATH \
OPENCLAW_CONFIG_PATH=/home/node/.openclaw/openclaw.json
WORKDIR /home/node/app
# 4. Create the config file (Added your domains to be safe)
RUN echo '{"gateway": {"trustedProxies": ["10.0.0.0/8"], "controlUi": {"allowedOrigins": ["https://huggingface.co", "https://ewssbd-sami-openclaw.hf.space", "https://oc.samiulfaysal.com.es", "https://ocui.pages.dev"], "allowInsecureAuth": true, "dangerouslyDisableDeviceAuth": true}}}' > /home/node/.openclaw/openclaw.json
# 5. Install OpenClaw locally
RUN npm install openclaw@latest
# 6. Expose and Start (Clean startup command)
EXPOSE 7860
CMD ["npx", "openclaw", "gateway", "--port", "7860", "--bind", "lan", "--allow-unconfigured", "--token", "Faysal25524"] |