mirror of
https://github.com/fullstorydev/grpcurl.git
synced 2026-11-22 07:16:34 +03:00
f5c25e012b
* Go 1.26 baseline, golangci-lint, dependency updates - Go baseline is now 1.26 (`go.mod`); CI tests the two newest majors, 1.26 and 1.27 (previously 1.23-1.25). - Replaces the separate gofmt/vet/staticcheck/ineffassign/predeclared Makefile targets (and the unused golint/errcheck ones) with a single pinned `golangci-lint` v2 (`make lint`), configured in `.golangci.yml` to run the same checks. - `go get -u -t ./... && go mod tidy`. - Release workflow and Dockerfile now build with Go 1.27 (newest), while `go.mod` keeps 1.26 as the oldest supported version. - Lint fixes: none needed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Regenerate protos and reformat with Go 1.27 Go 1.27's gofmt reformats doc comments in generated code, and CI's checkgenerate runs on 1.27. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
37 lines
1.1 KiB
Docker
37 lines
1.1 KiB
Docker
FROM golang:1.27-alpine AS builder
|
|
LABEL maintainer="Fullstory Engineering"
|
|
|
|
# create non-privileged group and user
|
|
RUN addgroup -S grpcurl && adduser -S grpcurl -G grpcurl
|
|
|
|
WORKDIR /tmp/fullstorydev/grpcurl
|
|
# copy just the files/sources we need to build grpcurl
|
|
COPY VERSION *.go go.* /tmp/fullstorydev/grpcurl/
|
|
COPY cmd /tmp/fullstorydev/grpcurl/cmd
|
|
# and build a completely static binary (so we can use
|
|
# scratch as basis for the final image)
|
|
ENV CGO_ENABLED=0
|
|
ENV GO111MODULE=on
|
|
RUN go build -o /grpcurl \
|
|
-ldflags "-w -extldflags \"-static\" -X \"main.version=$(cat VERSION)\"" \
|
|
./cmd/grpcurl
|
|
|
|
FROM alpine:3 AS alpine
|
|
WORKDIR /
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=builder /etc/passwd /etc/passwd
|
|
COPY --from=builder /grpcurl /bin/grpcurl
|
|
USER grpcurl
|
|
|
|
ENTRYPOINT ["/bin/grpcurl"]
|
|
|
|
# New FROM so we have a nice'n'tiny image
|
|
FROM scratch
|
|
WORKDIR /
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=builder /etc/passwd /etc/passwd
|
|
COPY --from=builder /grpcurl /bin/grpcurl
|
|
USER grpcurl
|
|
|
|
ENTRYPOINT ["/bin/grpcurl"]
|