Skip to content

Instantly share code, notes, and snippets.

@hazcod
Last active August 5, 2022 16:52
Show Gist options
  • Save hazcod/b228cfc46aae035e8efdd7ad6f00fd8c to your computer and use it in GitHub Desktop.
Save hazcod/b228cfc46aae035e8efdd7ad6f00fd8c to your computer and use it in GitHub Desktop.
Use protobuf on golang alpine Docker image.
FROM golang:alpine
RUN apk add --no-cache protobuf git \
&& go get github.com/golang/protobuf/protoc-gen-go \
&& cp /go/bin/protoc-gen-go /usr/bin/
# e.g. find proto -type f -iname '*.proto' -exec protoc -I proto/ --go_out go/ {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment