Docker 转换
- 作者仓库星标 0
- 作者仓库 nano-core
Convert to Docker (Current Runtime Policy)
This repository now supports two runtime modes:
docker(preferred/default)host(advanced, explicit opt-in)
This skill enforces Docker-first configuration and verifies the runtime end-to-end.
1. Verify Docker Is Installed and Running
docker --version
docker info >/dev/null && echo "Docker ready" || echo "Docker not ready"
If Docker is missing:
- macOS: install Docker Desktop from https://www.docker.com/products/docker-desktop/
- Linux:
curl -fsSL https://get.docker.com | sh && sudo systemctl start docker
2. Set Docker Runtime Defaults
Update .env so Docker is selected and host-mode overrides are removed:
# ensure runtime is docker-first auto mode
if grep -q '^CONTAINER_RUNTIME=' .env 2>/dev/null; then
sed -i.bak 's/^CONTAINER_RUNTIME=.*/CONTAINER_RUNTIME=auto/' .env
else
echo 'CONTAINER_RUNTIME=auto' >> .env
fi
# remove host runtime opt-ins if present
sed -i.bak '/^FFT_NANO_ALLOW_HOST_RUNTIME=/d' .env
sed -i.bak '/^FFT_NANO_ALLOW_HOST_RUNTIME_IN_PROD=/d' .env
3. Build Runtime Artifacts
./container/build.sh
npm run build
4. Verify Agent Runtime
echo '{}' | docker run -i --entrypoint /bin/echo fft_nano-agent:latest "Container OK"
5. Verify Setup Path
Run the project setup checker (Docker path):
bash scripts/setup.sh
Expected behavior:
- Detects Docker runtime
- Builds/uses Docker image
- Passes runtime smoke checks
6. Restart Service
launchctl kickstart -k gui/$(id -u)/com.fft_nano
Notes
- Do not set
CONTAINER_RUNTIME=hostunless explicitly requested. - Host mode is intentionally gated by
FFT_NANO_ALLOW_HOST_RUNTIME=1. - Docker is the supported default for parity and operational consistency.
- 流狐分类
- 运维部署
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 83 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @0-CYBERDYNE-SYSTEMS-0 · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Docker
- 底层运行要求
- Docker
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 检测到的网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。;检出高风险片段:pipe_curl_to_shell
作者没有在当前 SKILL.md 中定义固定输出样例。 If Docker is missing: macOS: install Docker Desktop from https://www.docker.com/products/docker-desktop/ Linux: curl -fsSL https://get.docker.com | sh && sudo systemctl start docker
Update .env so Docker is selected and host-mode overrides are removed:
3. Build Runtime Artifacts
4. Verify Agent Runtime
Run the project setup checker (Docker path): Expected behavior: Detects Docker runtime
6. Restart Service
# Convert to Docker (Current Runtime Policy)
This repository now supports two runtime modes:
- `docker` (preferred/default)
- `host` (advanced, explicit opt-in)
This skill enforces Docker-first configuration and verifies the runtime end-to-end.
## 1. Verify Docker Is Installed and Running
```bash
docker --version
docker info >/dev/null && echo "Docker ready" || echo "Docker not ready"
```
If Docker is missing:
- macOS: install Docker Desktop from https://www.docker.com/products/docker-desktop/
- Linux: `curl -fsSL https://get.docker.com | sh && sudo systemctl start docker`
## 2. Set Docker Runtime Defaults
Update `.env` so Docker is selected and host-mode overrides are removed:
```bash
# ensure runtime is docker-first auto mode
if grep -q '^CONTAINER_RUNTIME=' .env 2>/dev/null; then
sed -i.bak 's/^CONTAINER_RUNTIME=.*/CONTAINER_RUNTIME=auto/' .env
else
echo 'CONTAINER_RUNTIME=auto' >> .env
fi
# remove host runtime opt-ins if present
sed -i.bak '/^FFT_NANO_ALLOW_HOST_RUNTIME=/d' .env
sed -i.bak '/^FFT_NANO_ALLOW_HOST_RUNTIME_IN_PROD=/d' .env
```
## 3. Build Runtime Artifacts
```bash
./container/build.sh
npm run build
```
## 4. Verify Agent Runtime
```bash
echo '{}' | docker run -i --entrypoint /bin/echo fft_nano-agent:latest "Container OK"
```
## 5. Verify Setup Path
Run the project setup checker (Docker path):
```bash
bash scripts/setup.sh
```
Expected behavior:
- Detects Docker runtime
- Builds/uses Docker image
- Passes runtime smoke checks
## 6. Restart Service
```bash
launchctl kickstart -k gui/$(id -u)/com.fft_nano
```
## Notes
- Do not set `CONTAINER_RUNTIME=host` unless explicitly requested.
- Host mode is intentionally gated by `FFT_NANO_ALLOW_HOST_RUNTIME=1`.
- Docker is the supported default for parity and operational consistency. 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> 1. Verify Docker Is Installed and Running → 2. Set Docker Runtime Defaults → 3. Build Runtime Artifacts → 4. Verify Agent Runtime → 5. Verify Setup Path → 6. Restart Service
要点 -> This skill enforces Docker-first configuration and verifies the runtime end-to-end. · - Do not set CONTAINERRUNTIME=host unless explicitly requested.
文件/命令 -> docker · host · curl -fsSL https://get.docker.com | sh && sudo systemctl start docker · .env · CONTAINERRUNTIME=host · FFTNANOALLOWHOSTRUNTIME=1
内容 SHA-256 -> ccac0878b5e5
原文结构
适用与边界
原文中的明确线索
docker、host、curl -fsSL https://get.docker.com | sh && sudo systemctl start docker、.env、CONTAINERRUNTIME=host、FFTNANOALLOWHOSTRUNTIME=1