← 返回 Skills 市场
Dolphindb Docker
作者
superStupidBear
· GitHub ↗
· v1.4.1
· MIT-0
242
总下载
0
收藏
1
当前安装
10
版本数
在 OpenClaw 中安装
/install dolphindb-docker
功能描述
Automate DolphinDB Docker deployment with auto architecture detection (ARM64/x86_64), smart memory allocation (50% rule), and full data persistence.
使用说明 (SKILL.md)
DolphinDB Docker 部署技能
功能说明
自动化部署 DolphinDB Docker 容器,包括:
- 自动检测本机芯片架构(ARM64/x86_64)
- 自动读取本机内存并按 50% 原则分配
- 下载指定版本的 DolphinDB 官方 Docker 镜像
- 完整持久化
/data/ddb/server/目录到主机 - License 指纹采集挂载
/etc目录
使用方法
基础部署
# 部署最新版(自动检测架构和内存)
./deploy-dolphindb.sh
# 部署指定版本
./deploy-dolphindb.sh v2.00.7
# 自定义内存(GB)
./deploy-dolphindb.sh v2.00.7 16
# 自定义数据目录
./deploy-dolphindb.sh v2.00.7 8 /path/to/data
Python 调用
import subprocess
# 部署 DolphinDB
subprocess.run([
'./skills/dolphindb-docker/deploy-dolphindb.sh',
'v2.00.7', # 版本
'8', # 内存 GB(可选,默认自动计算)
'/Users/mac/Documents/dolphindb_docker_server' # 数据目录(可选)
])
文件结构
dolphindb-docker/
├── SKILL.md # 技能说明(本文件)
├── deploy-dolphindb.sh # 部署脚本
└── README.md # 详细文档
部署逻辑
1. 芯片检测
uname -m
# arm64 → 使用 dolphindb/dolphindb-arm64
# x86_64 → 使用 dolphindb/dolphindb
2. 内存计算
# 读取本机内存(字节)
mem_bytes=$(sysctl -n hw.memsize) # macOS
# 或
mem_bytes=$(grep MemTotal /proc/meminfo | awk '{print $2 * 1024}') # Linux
# 转换为 GB 并取 50%
mem_gb=$((mem_bytes / 1024 / 1024 / 1024))
mem_limit=$((mem_gb / 2))
3. Docker 启动命令
docker run -itd --name dolphindb \
--hostname cnserver10 \
--platform \x3C架构> \
-m \x3C内存>g \
-p 8848:8848 \
-p 8849:8849 \
-v /etc:/dolphindb/etc \
-v \x3C主机数据目录>:/data/ddb/server \
dolphindb/\x3C镜像>:\x3C版本>
验证部署
# 检查容器状态
docker ps --filter name=dolphindb
# 查看日志
docker logs dolphindb
# 访问 Web UI
curl http://localhost:8848
# Python 连接测试
python3 -c "
import dolphindb as ddb
s = ddb.session()
s.connect('localhost', 8848)
print(s.run('version()'))
"
注意事项
- 首次部署:数据目录会自动初始化
- 升级版本:保留数据目录,只需更换镜像版本
- 内存调整:修改
maxMemSize配置文件后重启容器 - 端口冲突:如 8848 被占用,修改
-p参数
故障排查
容器启动失败
# 查看详细日志
docker logs dolphindb
# 检查端口占用
lsof -i:8848
内存不足
# 降低内存限制
docker run -m 4g ...
架构不匹配
# 确认本机架构
uname -m
# 使用对应镜像
# ARM64: dolphindb/dolphindb-arm64
# x86_64: dolphindb/dolphindb
安全使用建议
This script will run docker commands and create a DolphinDB container. Before using it: (1) review and remove or narrow the /etc mount—mounting the entire host /etc into a container can expose system configuration and secrets; instead mount only the specific license file or directory you trust; (2) set DATA_DIR to a dedicated, non-system path (do not point it at /, /etc, or other system paths); (3) be cautious about the script's chmod -R 755 on the data directory—ensure the path is correct; (4) verify the Docker image name and source on Docker Hub (pull the image manually first if you prefer), and run the container with least privilege (non-root user, --read-only or capabilities dropped) where possible; (5) if you are not comfortable with host-level mounts, consider running this in an isolated VM or sandbox. These issues look intentional or careless rather than clearly malicious, so proceed only after making the above changes or confirming you trust the image and host exposure.
功能分析
Type: OpenClaw Skill
Name: dolphindb-docker
Version: 1.4.1
The skill bundle automates DolphinDB deployment but includes a high-risk configuration in `deploy-dolphindb.sh` and `SKILL.md` by mounting the host's entire `/etc` directory into the Docker container (`-v /etc:/dolphindb/etc`). While the documentation claims this is for 'License fingerprint collection,' it grants the container read access to sensitive host system files (e.g., passwd, hosts, etc.). There is no evidence of intentional exfiltration, but the broad permission is a significant security vulnerability.
能力评估
Purpose & Capability
Name/description match the included script and docs: this is a DolphinDB Docker deployer requiring only docker. However the deployment explicitly mounts the host /etc into the container (/etc -> /dolphindb/etc) for "License 指纹采集"; mounting the entire /etc is not proportional to deploying a DB container and allows the image to read many host configuration files (and potentially secrets).
Instruction Scope
Runtime instructions and the script perform expected tasks (arch detection, memory calc, image pull, docker run, docker cp). They also instruct: (1) mounting /etc into the container, (2) copying files from the image into a host data directory, and (3) recursively chmod -R 755 the data directory. Mounting /etc and wide permission changes broaden the skill's scope beyond safe deployment tasks and could expose sensitive host data or alter permissions if a user provides an unsafe path.
Install Mechanism
This is instruction-only with an included shell script; nothing is downloaded or written by an automated installer. No external or obscure URLs are used. Risk from install mechanism itself is low.
Credentials
The skill requests no environment variables or credentials, which is good, but the requested host access (mounting /etc) effectively grants the container access to system-wide configuration and potentially sensitive files. That level of host access is disproportionate to the stated goal of deploying DolphinDB; a more limited approach (mount a single license file/path) would be appropriate.
Persistence & Privilege
The skill does not request always: true and does not change other skills. It does persist data under a host directory and changes permissions (chmod -R 755). If the user supplies an unsafe DATA_DIR (or accepts the default), those operations could modify important files. No automatic persistent installation of the skill itself is performed.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install dolphindb-docker - 安装完成后,直接呼叫该 Skill 的名称或使用
/dolphindb-docker触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.4.1
- New automated deployment script: deploy-dolphindb.sh
- Auto-detects CPU architecture (ARM64/x86_64) and system memory, allocating 50% of available RAM for Docker container.
- Full data persistence for DolphinDB server directory and automatic license fingerprint collection.
- Simplified usage examples for both shell and Python invocation.
- Redesigned documentation (SKILL.md, README.md) with concise, practical deployment and troubleshooting instructions.
v1.4.0
v1.4.0:添加强制环境检测流程,支持全局包装器调用
v1.0.3
环境检测脚本路径修复,添加 dolphindb-basic 依赖提示
v1.0.2
- 新增“前置依赖:Python 环境检测”章节,说明如何检测并加载 Python 环境以便正确集成 Python SDK。
- 补充并统一 Python SDK 调用接口文档,推荐使用 `dolphin_python` 和 `dolphin_pip` 代替普通命令。
- 技能主体部署与操作流程未变,仅在文档顶部突出环境依赖事项,提升易用性和兼容性。
- 其余文档内容与部署说明保持与上一版一致。
v1.0.1
v1.0.1 - 更新部署配置
v1.2.0
Added Python SDK integration with official API client installation guide and HTTP API alternative, plus comprehensive connection testing examples
v1.1.2
Fixed all section numbering
v1.1.1
Fixed section numbering
v1.1.0
Added comprehensive Docker startup verification and port testing section with 6-step validation process including one-click test script
v1.0.0
Initial release: Complete Docker-based deployment guide for DolphinDB with automatic Docker check/install, image management, and container orchestration
元数据
常见问题
Dolphindb Docker 是什么?
Automate DolphinDB Docker deployment with auto architecture detection (ARM64/x86_64), smart memory allocation (50% rule), and full data persistence. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 242 次。
如何安装 Dolphindb Docker?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install dolphindb-docker」即可一键安装,无需额外配置。
Dolphindb Docker 是免费的吗?
是的,Dolphindb Docker 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Dolphindb Docker 支持哪些平台?
Dolphindb Docker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(macos, linux)。
谁开发了 Dolphindb Docker?
由 superStupidBear(@ugpoor)开发并维护,当前版本 v1.4.1。
推荐 Skills