8900 commited on
Create Dockerfile
Browse files- Dockerfile +25 -0
Dockerfile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:22
|
| 2 |
+
|
| 3 |
+
RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
|
| 4 |
+
|
| 5 |
+
# 安装 bun
|
| 6 |
+
RUN curl -fsSL https://bun.sh/install | bash
|
| 7 |
+
ENV PATH="/root/.bun/bin:${PATH}"
|
| 8 |
+
|
| 9 |
+
WORKDIR /app
|
| 10 |
+
|
| 11 |
+
# 复制配置脚本
|
| 12 |
+
COPY setup-hf-config.mjs /setup-hf-config.mjs
|
| 13 |
+
|
| 14 |
+
# 拉 openclaw
|
| 15 |
+
RUN git clone https://github.com/Josephrp/openclaw.git .
|
| 16 |
+
|
| 17 |
+
RUN corepack enable
|
| 18 |
+
RUN pnpm install
|
| 19 |
+
RUN pnpm build
|
| 20 |
+
RUN pnpm ui:build
|
| 21 |
+
|
| 22 |
+
EXPOSE 7860
|
| 23 |
+
|
| 24 |
+
CMD node /setup-hf-config.mjs && \
|
| 25 |
+
node openclaw.mjs gateway --bind 0.0.0.0 --port 7860 --allow-unconfigured
|