Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +8 -12
Dockerfile
CHANGED
|
@@ -9,27 +9,23 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
python3 \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# 2.
|
| 13 |
-
RUN mkdir -p /home/node/app
|
|
|
|
| 14 |
|
| 15 |
# 3. Switch to the 'node' user
|
| 16 |
USER node
|
| 17 |
ENV HOME=/home/node \
|
| 18 |
PATH=/home/node/.local/bin:$PATH \
|
| 19 |
-
|
| 20 |
-
OPENCLAW_CONFIG_PATH=/home/node/app/openclaw.json
|
| 21 |
WORKDIR /home/node/app
|
| 22 |
|
| 23 |
-
# 4. Create the config file
|
| 24 |
-
|
| 25 |
-
RUN mkdir -p /home/node/.openclaw/workspace && \
|
| 26 |
-
echo '{"gateway": {"trustedProxies": ["10.0.0.0/8"], "controlUi": {"allowedOrigins": ["https://huggingface.co", "https://ewssbd-sami-openclaw.hf.space", "https://oc.samiulfaysal.com.es"], "allowInsecureAuth": true, "dangerouslyDisableDeviceAuth": true}}}' > /home/node/app/openclaw.json
|
| 27 |
|
| 28 |
# 5. Install OpenClaw locally
|
| 29 |
RUN npm install openclaw@latest
|
| 30 |
|
| 31 |
-
# 6. Expose
|
| 32 |
EXPOSE 7860
|
| 33 |
-
|
| 34 |
-
# 7. Initialize the agent workspace first, then start the gateway
|
| 35 |
-
CMD npx openclaw agents init main && npx openclaw gateway --port 7860 --bind lan --allow-unconfigured --token Faysal25524
|
|
|
|
| 9 |
python3 \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
+
# 2. Use existing 'node' user
|
| 13 |
+
RUN mkdir -p /home/node/app /home/node/.openclaw && \
|
| 14 |
+
chown -R node:node /home/node/app /home/node/.openclaw
|
| 15 |
|
| 16 |
# 3. Switch to the 'node' user
|
| 17 |
USER node
|
| 18 |
ENV HOME=/home/node \
|
| 19 |
PATH=/home/node/.local/bin:$PATH \
|
| 20 |
+
OPENCLAW_CONFIG_PATH=/home/node/.openclaw/openclaw.json
|
|
|
|
| 21 |
WORKDIR /home/node/app
|
| 22 |
|
| 23 |
+
# 4. Create the config file (Added your domains to be safe)
|
| 24 |
+
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
|
|
|
|
|
|
|
| 25 |
|
| 26 |
# 5. Install OpenClaw locally
|
| 27 |
RUN npm install openclaw@latest
|
| 28 |
|
| 29 |
+
# 6. Expose and Start (Clean startup command)
|
| 30 |
EXPOSE 7860
|
| 31 |
+
CMD ["npx", "openclaw", "gateway", "--port", "7860", "--bind", "lan", "--allow-unconfigured", "--token", "Faysal25524"]
|
|
|
|
|
|