|
25 | 25 | - [HTTPS and Certificate Generation](#https-and-certificate-generation) |
26 | 26 | - [Plugins](#plugins) |
27 | 27 | - [API Reference](#api-reference) |
| 28 | +- [Docker Deployment](#docker-deployment) |
28 | 29 | - [CI/CD Pipeline](#cicd-pipeline) |
29 | 30 | - [Contributing](#contributing) |
30 | 31 | - [License](#license) |
@@ -276,6 +277,41 @@ MCPServer++ provides basic support for the MCP Resources primitive, which allows |
276 | 277 | } |
277 | 278 | ``` |
278 | 279 |
|
| 280 | +## Docker Deployment |
| 281 | + |
| 282 | +### Build and Run |
| 283 | +1. **Multi-stage build** (Image size optimized to 10-15MB) |
| 284 | + ```bash |
| 285 | + docker build -t mcp-server . |
| 286 | + docker run -p 6666:6666 -v $(pwd)/plugins:/plugins -v $(pwd)/certs:/certs mcp-server |
| 287 | + ``` |
| 288 | + |
| 289 | +2. **HTTPS Configuration** (Certificate directory mounting required) |
| 290 | + ```bash |
| 291 | + # Enable HTTPS by setting enable_https=1 in config.ini |
| 292 | + # Certificate files must be placed in /certs directory inside container |
| 293 | + docker run -p 6667:6667 -v $(pwd)/certs:/certs mcp-server |
| 294 | + ``` |
| 295 | + |
| 296 | +### Plugin System |
| 297 | +- **Plugin Path Mapping**: Container plugin directory is `/plugins`, recommend mapping local directory via volume |
| 298 | +- **Plugin Loading**: Supports runtime hot-loading (ensure correct file permissions) |
| 299 | + |
| 300 | +### Image Optimization |
| 301 | +- Based on minimal `gcr.io/distroless/cc-debian12` base image |
| 302 | +- Static linking + debug info stripping (LTO optimized) |
| 303 | +- Domestic users can configure mirror accelerators (see configuration examples) |
| 304 | + |
| 305 | +## Docker Hub |
| 306 | + |
| 307 | +Pre-built Docker images are available on Docker Hub: [https://hub.docker.com/r/mgzy/mcp-server](https://hub.docker.com/r/mgzy/mcp-server) |
| 308 | + |
| 309 | +You can pull and run the latest image directly: |
| 310 | +```bash |
| 311 | +docker pull mgzy/mcp-server |
| 312 | +docker run -p 6666:6666 -v $(pwd)/plugins:/plugins -v $(pwd)/certs:/certs mgzy/mcp-server |
| 313 | +``` |
| 314 | + |
279 | 315 | ## CI/CD Pipeline |
280 | 316 |
|
281 | 317 | Our project uses GitHub Actions for continuous integration and deployment. The pipeline automatically builds and tests the server on multiple platforms: |
|
0 commit comments