Merge pull request 'fix(gitea): pin rebuilt image by digest, match upstream CMD form' (#123) from fix/gitea-mcp-digest-pin into main
Some checks failed
CI/CD / typecheck (push) Successful in 1m18s
CI/CD / lint (push) Successful in 2m30s
CI/CD / test (push) Successful in 1m27s
CI/CD / smoke (push) Failing after 2m1s
CI/CD / build (push) Successful in 4m27s
CI/CD / publish (push) Has been skipped

This commit was merged in pull request #123.
This commit is contained in:
2026-08-21 16:07:31 +00:00

View File

@@ -26,11 +26,18 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \ && apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY --from=docker.gitea.com/gitea-mcp-server:latest /app/gitea-mcp /usr/local/bin/gitea-mcp # Pinned by DIGEST, not :latest. `latest` moves, and a rebuild that silently
# ships a different server version is indistinguishable from a broken rebuild —
# chased exactly that here when a probe started failing after a rebuild.
# This digest is gitea-mcp-server 1.6.0 (label org.opencontainers.image.version),
# the build that was running when this image was introduced.
# To bump: skopeo inspect docker://docker.gitea.com/gitea-mcp-server:latest
COPY --from=docker.gitea.com/gitea-mcp-server@sha256:dda8d56e6a91fa89cad186becc27c7aa83d74acdd5dc69f89af840d7bb78a631 /app/gitea-mcp /usr/local/bin/gitea-mcp
WORKDIR /app WORKDIR /app
# Kept as ENTRYPOINT so the plain (non-injected) path behaves exactly like # CMD, not ENTRYPOINT — matching upstream, which sets Cmd ["/app/gitea-mcp"] and
# upstream. mcpd REPLACES this with the sourcing wrapper when the server opts # no entrypoint. mcpd maps a server's `command` to k8s `args`, which REPLACES
# into injected delivery — that is why a shell has to exist in the image. # Cmd but only appends to an ENTRYPOINT; keeping the same form means the plain
ENTRYPOINT ["/usr/local/bin/gitea-mcp"] # (non-injected) path behaves byte-identically to upstream.
CMD ["/usr/local/bin/gitea-mcp"]