8900 commited on
Update Dockerfile
Browse files- Dockerfile +10 -3
Dockerfile
CHANGED
|
@@ -1,26 +1,33 @@
|
|
| 1 |
FROM node:22
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
|
| 4 |
|
|
|
|
| 5 |
RUN curl -fsSL https://bun.sh/install | bash
|
| 6 |
ENV PATH="/root/.bun/bin:${PATH}"
|
| 7 |
|
| 8 |
WORKDIR /app
|
| 9 |
|
|
|
|
| 10 |
RUN git clone https://github.com/Josephrp/openclaw.git .
|
| 11 |
|
|
|
|
| 12 |
RUN corepack enable
|
| 13 |
|
|
|
|
| 14 |
RUN pnpm install
|
| 15 |
RUN pnpm build
|
| 16 |
RUN pnpm ui:build
|
| 17 |
|
|
|
|
| 18 |
COPY setup-hf-config.mjs /setup-hf-config.mjs
|
| 19 |
|
| 20 |
EXPOSE 7860
|
| 21 |
|
|
|
|
| 22 |
CMD node /setup-hf-config.mjs && \
|
| 23 |
node openclaw.mjs gateway \
|
| 24 |
-
--
|
| 25 |
-
--
|
| 26 |
-
--
|
|
|
|
| 1 |
FROM node:22
|
| 2 |
|
| 3 |
+
# 系统依赖
|
| 4 |
RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 6 |
+
# 安装 Bun
|
| 7 |
RUN curl -fsSL https://bun.sh/install | bash
|
| 8 |
ENV PATH="/root/.bun/bin:${PATH}"
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
+
# 克隆 OpenClaw
|
| 13 |
RUN git clone https://github.com/Josephrp/openclaw.git .
|
| 14 |
|
| 15 |
+
# 启用 pnpm
|
| 16 |
RUN corepack enable
|
| 17 |
|
| 18 |
+
# 安装依赖并 build(只在镜像构建阶段)
|
| 19 |
RUN pnpm install
|
| 20 |
RUN pnpm build
|
| 21 |
RUN pnpm ui:build
|
| 22 |
|
| 23 |
+
# 复制生产级配置脚本
|
| 24 |
COPY setup-hf-config.mjs /setup-hf-config.mjs
|
| 25 |
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
+
# 启动命令,修复 bind 问题 + 配置覆盖 + 允许未配置
|
| 29 |
CMD node /setup-hf-config.mjs && \
|
| 30 |
node openclaw.mjs gateway \
|
| 31 |
+
--allow-unconfigured \
|
| 32 |
+
--bind lan \
|
| 33 |
+
--port 7860
|