You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: update MCP server profile for distroless Hummingbird (v1.3.0) (#2)
Hummingbird runtime images are now distroless — no shell, no package
manager. Updates the MCP server profile to document:
- Distroless runtime constraints (no shell-form RUN)
- Venv build pattern (replaces wheel-based example)
- FIPS image variants in base images table
- Exec-form RUN as fallback guidance
Ref: https://issues.redhat.com/browse/HUM-813
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: profiles/mcp-server.md
+32-17Lines changed: 32 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# MCP Server Profile
2
2
3
-
> **Profile Version:** 1.2.0
3
+
> **Profile Version:** 1.3.0
4
4
> **Applies to:** All `mcp-*-crunchtools` projects
5
5
6
6
This profile extends the [universal constitution](../constitution.md) with requirements specific to MCP (Model Context Protocol) servers in the crunchtools organization.
@@ -90,46 +90,61 @@ Every MCP server MUST support all three MCP transports:
90
90
91
91
MCP servers use **Hummingbird** base images (not UBI). Hummingbird images are minimal, CVE-hardened, and purpose-built for application workloads.
92
92
93
+
### Distroless Runtime
94
+
95
+
Hummingbird runtime images are **distroless** — they contain no shell (`/bin/sh`), no package manager (`dnf`), and no standard Unix utilities (`ls`, `rm`, `cat`). Only the language runtime binary (e.g., `python3`, `pip`) is present.
96
+
97
+
This means:
98
+
-**No shell-form `RUN` commands** in the runtime stage. Shell-form `RUN` requires `/bin/sh` to interpret the command, which does not exist.
99
+
-**Use the venv pattern** (preferred): build everything in the builder stage inside a Python venv, then `COPY --from=builder` the venv directory to the runtime stage. This eliminates all `RUN` commands in the runtime stage.
100
+
-**Exec-form `RUN` as fallback**: if you must run a command in the runtime stage, use exec form `RUN ["pip", "install", ...]` to invoke the binary directly without a shell.
101
+
93
102
### Base Images
94
103
95
104
| Image | Use Case |
96
105
|-------|----------|
97
-
|`quay.io/hummingbird/python:latest`| Python runtime (no build tools, no DNF) |
98
-
|`quay.io/hummingbird/python:latest-builder`| Python with build toolchain (gcc, libstdc++, DNF) |
|`quay.io/hummingbird/core-runtime:latest`| Minimal runtime with libstdc++, glibc, ca-certificates |
101
112
102
-
### Multi-Stage Build Pattern
113
+
### Multi-Stage Build Pattern (Venv)
103
114
104
115
MCP servers MUST use a multi-stage Containerfile with **builder and runtime images from the same ecosystem**:
105
116
106
-
1.**Builder stage** — compile native wheels using the Hummingbird builder variant
107
-
2.**Runtime stage** — copy wheels into Hummingbird runtime, install with `pip --no-index`
117
+
1.**Builder stage** — create a venv, install all dependencies inside it
118
+
2.**Runtime stage** — `COPY` the venv from builder, set `PATH`. No `RUN` commands needed.
108
119
109
120
**CRITICAL: Builder and runtime images MUST be from the same base image family.** Never use Fedora, Alpine, or UBI as the builder when the runtime is Hummingbird (or vice versa). Different base images use different glibc versions — compiled artifacts and native libraries from one ecosystem are not designed or tested against the other. This creates silent ABI incompatibilities, segfaults, or subtle runtime failures.
0 commit comments