-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 1.3 KB
/
Copy pathDockerfile
File metadata and controls
34 lines (26 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ------ Builder Stage --------------
FROM rust:1.97 AS builder
WORKDIR /app
RUN cargo install cargo-auditable
COPY Cargo.toml Cargo.lock ./
RUN cargo fetch
COPY src ./src
# tests/ is copied so the `mock-mcp-child` [[bin]] target path declared in
# Cargo.toml resolves during manifest parsing. We restrict the build to the
# production binary so the mock isn't actually compiled into the image.
COPY tests ./tests
RUN cargo auditable build --release --locked --bin hyper-mcp-proxy
# ------- Cosign Stage ---------------
FROM ghcr.io/sigstore/cosign/cosign:v3.1.1 AS cosign
# ------- Production Stage -----------
FROM debian:13-slim
LABEL org.opencontainers.image.authors="joseph.wortmann@gmail.com" \
org.opencontainers.image.url="https://github.com/hyper-mcp-rs/hyper-mcp-proxy" \
org.opencontainers.image.source="https://github.com/hyper-mcp-rs/hyper-mcp-proxy" \
org.opencontainers.image.vendor="github.com/hyper-mcp-rs/hyper-mcp-proxy" \
io.modelcontextprotocol.server.name="io.github.hyper-mcp-rs/hyper-mcp-proxy"
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=cosign /ko-app/cosign /usr/local/bin/cosign
WORKDIR /app
COPY --from=builder /app/target/release/hyper-mcp-proxy /usr/local/bin/hyper-mcp-proxy
ENTRYPOINT ["/usr/local/bin/hyper-mcp-proxy"]