Skip to content

Instantly share code, notes, and snippets.

@bliuchak
Last active April 11, 2022 22:36
Show Gist options
  • Save bliuchak/233ec886374db630cd6a7327d82ff0f6 to your computer and use it in GitHub Desktop.
Save bliuchak/233ec886374db630cd6a7327d82ff0f6 to your computer and use it in GitHub Desktop.
buf with go plugin (protoc-gen-go)
FROM golang:1.15.7-alpine3.12 as golang
ENV GO111MODULE=on
RUN go get -u google.golang.org/grpc@v1.35.0 \
&& go get -u github.com/golang/protobuf/protoc-gen-go@v1.4.3
FROM bufbuild/buf:0.36.0 as buf
FROM scratch
COPY --from=golang /go/bin/protoc-gen-go /go/bin/protoc-gen-go
COPY --from=buf /usr/local/bin/buf /usr/local/bin/buf
ENV PATH="/go/bin:${PATH}"
ENTRYPOINT ["/usr/local/bin/buf"]
@yehudamakarov
Copy link

thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment