snapshot of 8b9e9fcfc8b13c2d29024f6f756b28bc6851512b Annotations about the code that implements koment.

Dockerfile

1 # syntax=docker/dockerfile:1
2
3 ARG GO_VERSION=1.26.5
4
5 FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS build
6
7 ARG TARGETOS
8 ARG TARGETARCH
9 ARG VERSION=dev
10 ARG REVISION=unknown
11
12 WORKDIR /src
13
14 COPY go.mod go.sum ./
15 RUN --mount=type=cache,target=/go/pkg/mod go mod download
16
17 COPY . .
18
19 RUN --mount=type=cache,target=/go/pkg/mod \
20 --mount=type=cache,target=/root/.cache/go-build \
21 CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
22 go build -trimpath \
23 -ldflags="-s -w -X main.releaseVersion=${VERSION} -X main.sourceRevision=${REVISION}" \
24 -o /out/koment ./cmd/koment
25
26 FROM gcr.io/distroless/static-debian12:nonroot@sha256:f5b485ea962d9bd1186b2f6b3a061191539b905b82ec395de78cbfae51f20e35
27
28 ARG VERSION
29 ARG REVISION
30 LABEL org.opencontainers.image.title="koment" \
31 org.opencontainers.image.description="Out-of-band code annotations, checked against the code they describe" \
32 org.opencontainers.image.source="https://github.com/janpuc/koment" \
33 org.opencontainers.image.licenses="AGPL-3.0-or-later" \
34 org.opencontainers.image.version="${VERSION}" \
35 org.opencontainers.image.revision="${REVISION}" \
36 io.modelcontextprotocol.server.name="io.github.janpuc/koment"
37
38 COPY --from=build /out/koment /usr/local/bin/koment
39
40 WORKDIR /
41 USER nonroot:nonroot
42 EXPOSE 8080
43
44 ENTRYPOINT ["/usr/local/bin/koment"]
45 CMD ["serve", "--config", "/config/repositories.yaml", "--listen", "0.0.0.0:8080"]

Find an annotation

Search file paths, rationale, kinds, and authors.

moveEnter openEsc close