Skip to content

Commit 7df4043

Browse files
domdomeggclaude
andcommitted
Add Docker image documentation and workflow
Add documentation for pre-built Docker images including usage examples and configuration guidance. Include GitHub Actions workflow for automated Docker image publishing. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 431a670 commit 7df4043

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

.github/workflows/docker.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
build-and-push:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Log in to Container Registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Extract metadata
29+
id: meta
30+
uses: docker/metadata-action@v5
31+
with:
32+
images: ghcr.io/${{ github.repository }}
33+
tags: |
34+
type=raw,value=latest,enable={{is_default_branch}}
35+
type=sha,prefix=main-{{date 'YYYYMMDD'}}-,enable={{is_default_branch}}
36+
37+
- name: Build and push Docker image
38+
uses: docker/build-push-action@v5
39+
with:
40+
context: .
41+
file: ./Dockerfile
42+
platforms: linux/amd64,linux/arm64
43+
push: true
44+
tags: ${{ steps.meta.outputs.tags }}
45+
labels: ${{ steps.meta.outputs.labels }}
46+
cache-from: type=gha
47+
cache-to: type=gha,mode=max

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,24 @@ The service can be configured using environment variables:
417417
| `MCP_REGISTRY_SEED_IMPORT` | Import `seed.json` on first run | `true` |
418418
| `MCP_REGISTRY_SERVER_ADDRESS` | Listen address for the server | `:8080` |
419419

420+
## Pre-built Docker Images
421+
422+
Pre-built Docker images are automatically published to GitHub Container Registry on each release and main branch commit:
423+
424+
```bash
425+
# Run latest from main branch
426+
docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:latest
427+
428+
# Run specific commit build
429+
docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:main-20250806-a1b2c3d
430+
```
431+
432+
**Available image tags:**
433+
- `latest` - Latest commit from main branch
434+
- `main-<date>-<sha>` - Specific commit builds
435+
436+
**Configuration:** The Docker images support all environment variables listed in the [Configuration](#configuration) section. For production deployments, you'll need to configure the database connection and other settings via environment variables.
437+
420438
## License
421439

422440
See the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)