Files
pruefwerk/Dockerfile.mcp
T
sharangandClaude Opus 5.5 f77e78c5d2
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 5m41s
CI / Deploy Agent (push) Successful in 12m40s
CI / Deploy Dashboard (push) Successful in 14m39s
CI / Check (push) Skipped
fix(deps): Distrust the compromised eMudhra root (webpki-roots 1.0.10) (#574)
webpki-roots 1.0.10 and rustls-webpki 0.103.16 drop emSign ECC Root CA - G3 from the compiled-in roots (Mozilla bug 2083449); agent, dashboard and MCP final stages fail the build if Debian's store still ships it. zip extract() advisories RUSTSEC-2026-0367/0368/0369 ignored with reason (we never call extract()); zip 9.x follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 15:48:20 +00:00

38 lines
1.5 KiB
Docker

FROM rust:1.94-bookworm AS builder
WORKDIR /app
COPY . .
# compliance-agent (a workspace member) depends on the private firmwerk git
# repo, so the workspace resolve needs it even to build the mcp binary.
# Authenticate the fetch with a PAT passed as a BuildKit secret.
RUN --mount=type=secret,id=git_token \
if [ -s /run/secrets/git_token ]; then \
git config --global \
url."https://platform-ci:$(cat /run/secrets/git_token)@git.breakpilot.com/".insteadOf \
"ssh://git@git.breakpilot.com:22222/"; \
fi && \
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --release -p compliance-mcp
FROM debian:bookworm-slim
# curl only serves the healthcheck.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates libssl3 curl \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --uid 10001 --user-group --no-create-home --shell /usr/sbin/nologin app
# eMudhra (Mozilla bug 2083449, Oct 2026): fail the build if the image still
# trusts the compromised root. Also keeps a cached layer with the old store
# from being reused.
RUN test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt
COPY --from=builder /app/target/release/compliance-mcp /usr/local/bin/compliance-mcp
ENV MCP_PORT=8090
# The MCP server writes nothing to its filesystem.
USER app
EXPOSE 8090
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -fsS "http://127.0.0.1:${MCP_PORT}/health" || exit 1
ENTRYPOINT ["compliance-mcp"]