Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target/
.cache/
assets/
resources/
releases/
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/mcp_conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
uses: actions/checkout@v6.0.2

- name: Build data plane from the checked-out source
run: make conformance-image
run: >-
docker build --tag "${CF_DATAPLANE_IMAGE}"
--file docker/Dockerfile .

- name: Check out the alpha.11 conformance fixture
uses: actions/checkout@v6.0.2
Expand Down
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARGS ?=
DETECT_SECRETS_SPEC ?= git+https://github.com/ibm/detect-secrets.git@076672a9a01abdfc7ecee2e7d14f08cdccb73976
DETECT_SECRETS_EXCLUDE := '(?x)(Cargo\.lock$$|\.lock$$)|^\.secrets\.baseline$$'

.PHONY: help docker-prod compose-up compose-down conformance-image conformance docs-serve pre-commit secrets-scan-all configure-git
.PHONY: help docker-prod compose-up compose-down conformance docs-serve pre-commit secrets-scan-all configure-git

help: ## Show available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-22s\033[0m %s\n", $$1, $$2}'
Expand All @@ -25,10 +25,8 @@ compose-up: ## Launch stack: nginx, control plane, redis, postgres, pgbouncer, d
compose-down: ## Tear down the stack
docker compose -f docker/docker-compose.yml stop $(SERVICES) $(ARGS)

conformance-image: ## Build the current checkout for MCP conformance
docker build -t "$(CF_DATAPLANE_IMAGE)" -f docker/Dockerfile .

conformance: conformance-image ## Build and run official MCP 2026-07-28 conformance locally
conformance: ## Build the data plane and run official MCP 2026-07-28 conformance locally
docker build -t "$(CF_DATAPLANE_IMAGE)" -f docker/conformance.Dockerfile .
CF_DATAPLANE_IMAGE="$(CF_DATAPLANE_IMAGE)" tests/conformance/run-local.sh

docs-serve: ## Serve the wiki book locally at http://127.0.0.1:3000
Expand Down
32 changes: 32 additions & 0 deletions docker/conformance.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# syntax=docker/dockerfile:1

FROM rust:1.96.1 AS builder
WORKDIR /app

RUN <<EOF
apt update
apt install -y ca-certificates protobuf-compiler
EOF

COPY . .
RUN --mount=type=cache,id=cargo,target=/usr/local/cargo/registry,sharing=locked \
--mount=type=cache,id=cargo-git,target=/usr/local/cargo/git,sharing=locked \
--mount=type=cache,id=contextforge-conformance-target-rust-1.96.1,target=/app/target,sharing=locked \
cargo build --locked --package contextforge-data-plane \
--bin contextforge-data-plane \
--features "contextforge-data-plane-lib/with_tools contextforge-data-plane/plugins" && \
mkdir -p /out && \
cp target/debug/contextforge-data-plane /out/contextforge-data-plane && \
strip /out/contextforge-data-plane

FROM debian:trixie-slim
WORKDIR /

RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*

COPY --from=builder /out/contextforge-data-plane /contextforge-data-plane
LABEL org.opencontainers.image.source=https://github.com/contextforge-org/contextforge-data-plane
LABEL org.opencontainers.image.description="contextforge-data-plane - open source experimental data plane for ContextForge."
ENTRYPOINT ["/contextforge-data-plane"]