From e36137f5a1507a16f60e1414777f6c81c79b03b8 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 17 May 2026 18:10:54 +0000 Subject: [PATCH] Add `org.opencontainers.image.source` label (#193) Two image-label fixes: - Add `org.opencontainers.image.source` so tools like renovate can retrieve release notes from the source repo. - Re-declare `ARG VERSION` in the final stage. `ARG` after `FROM` is stage-scoped, so the builder-stage `VERSION` never reached the final stage and `org.opencontainers.image.version` expanded to an empty string in published images. Closes #192 --- This PR was written with the help of Claude Opus 4.7 Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/193 Reviewed-by: Lunny Xiao Co-authored-by: silverwind Co-committed-by: silverwind --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6242c4a..35e0d73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,11 +22,14 @@ RUN --mount=type=cache,target=/go/pkg/mod \ # Final stage FROM gcr.io/distroless/static-debian12:nonroot +ARG VERSION=dev + WORKDIR /app COPY --from=builder --chown=nonroot:nonroot /app/gitea-mcp . USER nonroot:nonroot LABEL org.opencontainers.image.version="${VERSION}" +LABEL org.opencontainers.image.source="https://gitea.com/gitea/gitea-mcp" CMD ["/app/gitea-mcp"]