如何使用Dashjoin平台通过Docker容器构建本地AI应用?
AI Summary (BLUF)
This tutorial demonstrates how to build local AI applications using Dashjoin platform with features like multimodal chat, RAG, and MCP tool support through Docker containers.
原文翻译: 本教程演示了如何使用Dashjoin平台通过Docker容器构建本地AI应用,包含多模态聊天、RAG和MCP工具支持等功能。
概述
Dashjoin 提供了一个一体化的 Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 环境,旨在简化本地 AI 应用程序的开发和部署。通过集成低代码平台、AI 后端、模型上下文协议(MCP)工具代理和数据库,它使开发者能够快速搭建起功能丰富的 AI 应用原型或生产环境。
Dashjoin provides an all-in-one Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 environment designed to simplify the development and deployment of local AI applications. By integrating a low-code platform, an AI backend, a Model Context Protocol (MCP) tool proxy, and a database, it enables developers to quickly set up feature-rich AI application prototypes or production environments.
核心特性
Dashjoin 解决方案集成了多项现代 AI 应用开发所需的关键能力:
The Dashjoin solution integrates several key capabilities required for modern AI application development:
- 本地模型支持 (Local Model Support): 原生支持与 Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。 集成,便于在本地运行开源大语言模型。
- 多模态对话 (Multimodal Chat): 支持文本、图像等多模态内容的交互与处理。
- 检索增强生成 (Retrieval Augmented Generation, RAG): 包含自动文档导入功能,能够基于私有知识库生成更准确、相关的回答。
- MCP 工具支持 (MCP Tool Support): 支持通过 MCP 协议集成外部工具,如网络搜索、文件访问、Microsoft 365 等。
- 自定义工具 (Custom Tools): 可利用 Dashjoin 平台和 JSONata一种用于查询和转换JSON数据的表达式语言,常用于数据提取和处理。 语言灵活创建和集成自定义功能工具。
- Local Model Support: Native integration with Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。 for running open-source large language models locally.
- Multimodal Chat: Supports interaction and processing of multimodal content such as text and images.
- Retrieval Augmented Generation (RAG): Includes automated document import, enabling the generation of more accurate and relevant responses based on private knowledge bases.
- MCP Tool Support: Integrates external tools via the Model Context Protocol, such as web search, file access, Microsoft 365, etc.
- Custom Tools: Enables flexible creation and integration of custom functional tools using the Dashjoin platform and JSONata一种用于查询和转换JSON数据的表达式语言,常用于数据提取和处理。 language.
架构与容器服务
该 Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 环境由四个核心服务容器组成,共同协作提供一个完整的开发栈。
The Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 environment consists of four core service containers that work together to provide a complete development stack.
| 容器名称 (Container Name) | 角色描述 (Role Description) | 关键功能 (Key Functions) |
|---|---|---|
| Platform | 主低代码平台 | 提供应用构建、数据管理和用户界面配置的核心平台。 |
| AIA | AI 后端服务 | 处理 AI 模型推理、对话管理、RAG 检索等核心 AI 逻辑。 |
| MCP-Proxy | MCP 工具代理 | 安装并管理 MCP 工具,作为 AI 代理与外部服务(如网络、文件系统)的安全桥梁。 |
| Postgres | 数据库 | 为 Platform 和 AIA 服务提供持久化数据存储。 |
快速入门指南
1. 获取代码
首先,克隆包含 Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 配置的 GitHub 仓库。
First, clone the GitHub repository containing the Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 configuration.
git clone https://github.com/dashjoin/docker-compose
cd docker-compose
2. 环境配置
根据你的 AI 模型来源进行相应配置。
Configure your environment based on your AI model source.
使用本地 Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。 (Using Local Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。): 如果已在本地运行 Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。(默认地址
http://host.docker.internal:11434),则基础配置已完成。若要使用 RAG 功能,请确保拉取所需的嵌入模型:- Using Local Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。: If Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。 is already running locally (default address
http://host.docker.internal:11434), the basic configuration is complete. To use the RAG feature, ensure you pull the required embedding model:
ollama pull nomic-embed-text- Using Local Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。: If Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。 is already running locally (default address
使用外部 AI 服务 (Using External AI Services): 如需使用 OpenAI 等云端服务,请在项目根目录的
.env文件中填入对应的 API 密钥。- Using External AI Services: If you need to use cloud services like OpenAI, enter the corresponding API key in the
.envfile in the project root directory.
- Using External AI Services: If you need to use cloud services like OpenAI, enter the corresponding API key in the
配置文件 mcp-proxy-config.json 和 settings.yml 包含了 AI 模型和 MCP 服务器的默认设置,通常无需修改。有关自定义模型的详细配置,请参阅官方文档。
The configuration files
mcp-proxy-config.jsonandsettings.ymlcontain default settings for AI models and MCP servers, which usually require no modification. For detailed configuration of custom models, please refer to the official documentation.
3. 启动与管理服务
使用以下 Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 命令管理整个服务栈的生命周期。
Use the following Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 commands to manage the lifecycle of the entire service stack.
| 命令 (Command) | 作用 (Action) | 说明 (Description) |
|---|---|---|
docker compose up |
启动所有容器 | 在前台启动并运行所有定义的服务。使用 -d 参数可后台运行。 |
docker compose stop |
停止运行中的容器 | 停止容器运行,但不删除容器或数据卷。 |
docker compose down |
停止并移除容器 | 停止容器并移除容器、网络。默认保留数据卷。 |
数据持久化
项目运行后,工作目录下会生成一个 volumes 文件夹,用于持久化存储 dashjoin 和 aia 容器的数据。PostgreSQL 数据库的数据则存储在一个名为 postgres 的 Docker 命名卷中(可通过 docker volume ls 查看)。
After the project runs, a
volumesfolder will be generated in the working directory to persistently store data for thedashjoinandaiacontainers. The PostgreSQL database data is stored in a Docker named volume calledpostgres(viewable viadocker volume ls).
重要提示:执行 docker compose down 命令不会删除这些卷,因此你的应用数据和配置在重启后得以保留。
Important Note: Executing the
docker compose downcommand does not delete these volumes, so your application data and configuration are preserved after restart.
高级配置:Docker 中的 MCP 网关
如果你在 Docker Desktop 中安装了 MCP 服务器工具包,并希望将其暴露给客户端(如 AIA)使用,可以运行 MCP 网关。
If you have installed the MCP server toolkit in Docker Desktop and wish to expose it to clients (such as AIA), you can run the MCP gateway.
source .env
export MCP_GATEWAY_AUTH_TOKEN=${MCP_GATEWAY_AUTH_TOKEN}
docker mcp gateway run --transport=http
此命令会启动一个网关,将 Docker 内的 MCP 服务器通过 HTTP 传输协议对外提供服务。
This command starts a gateway that exposes the MCP servers inside Docker to external services via the HTTP transport protocol.
许可证信息
本软件基于 PolyForm 免费试用许可证 1.0.0 授权。如需获取企业级许可证,请通过 Dashjoin 官网联系我们。
This software is licensed under the PolyForm Free Trial License 1.0.0. To obtain an enterprise license, please contact us via the Dashjoin official website.
总结
Dashjoin 的 Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 项目为开发者提供了一个开箱即用、模块清晰的本地 AI 应用开发环境。它通过容器化技术封装了从前端低代码平台到后端 AI 推理、工具扩展及数据存储的完整链路,极大地降低了构建复杂 AI 应用的门槛。无论是用于快速原型验证,还是作为更复杂系统的开发基础,都是一个极具价值的起点。
The Dashjoin Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。 project provides developers with an out-of-the-box, modular local AI application development environment. It encapsulates the complete pipeline from the front-end low-code platform to back-end AI inference, tool extension, and data storage using containerization technology, significantly lowering the barrier to building complex AI applications. Whether for rapid prototyping or as a foundation for more complex systems, it serves as a highly valuable starting point.
常见问题(FAQ)
Dashjoin平台支持哪些AI功能?
Dashjoin支持多模态聊天、RAG检索增强生成、MCP工具集成和自定义工具创建,并能通过Docker容器在本地运行开源大语言模型。
如何快速启动Dashjoin的Docker环境?
克隆GitHub仓库后,根据使用本地Ollama一个用于在本地运行大型语言模型的工具,支持多种开源模型。或外部AI服务配置环境,运行Docker Compose一个用于定义和运行多容器Docker应用程序的工具。在OpenClaw部署中,用于实现环境隔离、数据持久化与快速升级,是生产环境部署的首选方案。即可启动包含Platform、AIA、MCP-Proxy和Postgres的完整服务栈。
Dashjoin的RAG功能需要什么配置?
使用RAG功能需确保拉取嵌入模型(如nomic-embed-text),并配置文档导入路径,系统会自动基于私有知识库生成更准确的回答。
版权与免责声明:本文仅用于信息分享与交流,不构成任何形式的法律、投资、医疗或其他专业建议,也不构成对任何结果的承诺或保证。
文中提及的商标、品牌、Logo、产品名称及相关图片/素材,其权利归各自合法权利人所有。本站内容可能基于公开资料整理,亦可能使用 AI 辅助生成或润色;我们尽力确保准确与合规,但不保证完整性、时效性与适用性,请读者自行甄别并以官方信息为准。
若本文内容或素材涉嫌侵权、隐私不当或存在错误,请相关权利人/当事人联系本站,我们将及时核实并采取删除、修正或下架等处理措施。 也请勿在评论或联系信息中提交身份证号、手机号、住址等个人敏感信息。