← Back to Skills Marketplace
ugpoor

Dolphindb Docker

by superStupidBear · GitHub ↗ · v1.4.1 · MIT-0
macoslinux ⚠ suspicious
242
Downloads
0
Stars
1
Active Installs
10
Versions
Install in OpenClaw
/install dolphindb-docker
Description
Automate DolphinDB Docker deployment with auto architecture detection (ARM64/x86_64), smart memory allocation (50% rule), and full data persistence.
README (SKILL.md)

DolphinDB Docker 部署技能

功能说明

自动化部署 DolphinDB Docker 容器,包括:

  1. 自动检测本机芯片架构(ARM64/x86_64)
  2. 自动读取本机内存并按 50% 原则分配
  3. 下载指定版本的 DolphinDB 官方 Docker 镜像
  4. 完整持久化 /data/ddb/server/ 目录到主机
  5. 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()'))
"

注意事项

  1. 首次部署:数据目录会自动初始化
  2. 升级版本:保留数据目录,只需更换镜像版本
  3. 内存调整:修改 maxMemSize 配置文件后重启容器
  4. 端口冲突:如 8848 被占用,修改 -p 参数

故障排查

容器启动失败

# 查看详细日志
docker logs dolphindb

# 检查端口占用
lsof -i:8848

内存不足

# 降低内存限制
docker run -m 4g ...

架构不匹配

# 确认本机架构
uname -m

# 使用对应镜像
# ARM64: dolphindb/dolphindb-arm64
# x86_64: dolphindb/dolphindb
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dolphindb-docker
  3. After installation, invoke the skill by name or use /dolphindb-docker
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug dolphindb-docker
Version 1.4.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 10
Frequently Asked Questions

What is Dolphindb Docker?

Automate DolphinDB Docker deployment with auto architecture detection (ARM64/x86_64), smart memory allocation (50% rule), and full data persistence. It is an AI Agent Skill for Claude Code / OpenClaw, with 242 downloads so far.

How do I install Dolphindb Docker?

Run "/install dolphindb-docker" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Dolphindb Docker free?

Yes, Dolphindb Docker is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Dolphindb Docker support?

Dolphindb Docker is cross-platform and runs anywhere OpenClaw / Claude Code is available (macos, linux).

Who created Dolphindb Docker?

It is built and maintained by superStupidBear (@ugpoor); the current version is v1.4.1.

💬 Comments