Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# ============================================================
# ClawdBot Docker 镜像
#
# 构建: docker build -t clawdbot .
# 运行: docker run -d --name clawdbot -v ~/.clawdbot:/root/.clawdbot clawdbot
# OpenClaw Docker 镜像
#
# 构建: docker build -t openclaw .
# 运行: docker run -d --name openclaw -v ~/.openclaw:/root/.openclaw openclaw
# ============================================================

FROM node:22-alpine

LABEL maintainer="ClawdBot Community"
LABEL description="ClawdBot - Your Personal AI Assistant"
LABEL maintainer="OpenClaw Community"
LABEL description="OpenClaw - Your Personal AI Assistant"
LABEL version="1.0.0"

# 安装基础依赖
Expand All @@ -26,32 +26,32 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 创建工作目录
WORKDIR /app

# 安装 ClawdBot
RUN npm install -g clawdbot@latest
# 安装 OpenClaw
RUN npm install -g openclaw@latest

# 创建配置目录
RUN mkdir -p /root/.clawdbot/logs \
/root/.clawdbot/data \
/root/.clawdbot/skills \
/root/.clawdbot/backups
RUN mkdir -p /root/.openclaw/logs \
/root/.openclaw/data \
/root/.openclaw/skills \
/root/.openclaw/backups

# 复制默认配置和技能
COPY examples/config.example.yaml /root/.clawdbot/config.yaml.example
COPY examples/skills/ /root/.clawdbot/skills/
COPY examples/config.example.yaml /root/.openclaw/config.yaml.example
COPY examples/skills/ /root/.openclaw/skills/

# 设置卷挂载点
VOLUME ["/root/.clawdbot"]
VOLUME ["/root/.openclaw"]

# 暴露端口
EXPOSE 18789

# 健康检查
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD clawdbot health || exit 1
CMD openclaw health || exit 1

# 入口脚本
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["clawdbot", "start", "--daemon"]
CMD ["openclaw", "gateway"]
Loading