Skip to content

Instantly share code, notes, and snippets.

@jnst
Created August 27, 2018 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnst/ec218bf69b5aa7f36d93376fc64cffee to your computer and use it in GitHub Desktop.
Save jnst/ec218bf69b5aa7f36d93376fc64cffee to your computer and use it in GitHub Desktop.
Generating gRPC C++ code
FROM grpc/cxx
WORKDIR /workspace
RUN mkdir codegen
COPY ./protobuf /workspace/protobuf
CMD protoc \
--proto_path=./protobuf \
--grpc_out=./codegen --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` \
./protobuf/rpc/*.proto \
./protobuf/rpc/**/*.proto \
&& protoc \
--proto_path=./protobuf \
--cpp_out=./codegen \
./protobuf/rpc/*.proto \
./protobuf/rpc/**/*.proto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment