# gitea-mcp-server, rebuilt on a shell-bearing base. # # WHY THIS EXISTS # --------------- # Upstream `docker.gitea.com/gitea-mcp-server` is distroless: `Cmd` is # ["/app/gitea-mcp"] and there is no /bin/sh at any path (verified by exec'ing # every candidate against the running pod). # # That is fine until the server needs `secretDelivery: injector`. The OpenBao # agent renders secrets to a FILE, so mcpd wraps the container command as # `sh -c '. /vault/secrets/; exec "$0" "$@"'` — which needs a shell. With # no shell the pod cannot source its own credentials, and gitea was the single # server in the fleet blocked on this. # # Copying one static Go binary onto debian:stable-slim is cheaper than building # and maintaining a static "envexec" shim, and follows the precedent already set # by deploy/Dockerfile.docmost-mcp — this repo already rebuilds third-party MCP # servers when it needs to change how they run. # # ca-certificates is required, not incidental: the binary talks HTTPS to # https://mysources.co.uk and a distroless base ships its own trust store which # we are leaving behind. FROM debian:stable-slim RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates \ && rm -rf /var/lib/apt/lists/* COPY --from=docker.gitea.com/gitea-mcp-server:latest /app/gitea-mcp /usr/local/bin/gitea-mcp WORKDIR /app # Kept as ENTRYPOINT so the plain (non-injected) path behaves exactly like # upstream. mcpd REPLACES this with the sourcing wrapper when the server opts # into injected delivery — that is why a shell has to exist in the image. ENTRYPOINT ["/usr/local/bin/gitea-mcp"]