https://github.com/pasdam/grpc-gateway-docker
Image to generate a gRPC gateway from a proto
https://github.com/pasdam/grpc-gateway-docker
Last synced: 4 months ago
JSON representation
Image to generate a gRPC gateway from a proto
- Host: GitHub
- URL: https://github.com/pasdam/grpc-gateway-docker
- Owner: pasdam
- License: gpl-3.0
- Created: 2020-02-18T05:23:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-18T07:03:35.000Z (over 6 years ago)
- Last Synced: 2025-06-15T09:07:47.650Z (12 months ago)
- Language: Dockerfile
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grpc-gateway-docker
Image to generate a [gRPC gateway](https://grpc-ecosystem.github.io/grpc-gateway/) from a proto.
## Generate gRPC gateway from a proto
To generate the gRPC Gateway:
```sh
export PROTO_ROOT=your/proto/root
export API_CONF_PATH=your/api/config/file
export OUT_DIR=your/output/dir
export PROTO_PATH=$PROTO_ROOT/your/service.proto
docker run --rm -v `pwd`:/tmp/grpc pasdam/grpc-gateway:1.3-alpine protoc -I$(PROTO_ROOT) --grpc-gateway_out=logtostderr=true,grpc_api_configuration=$(API_CONF_PATH):$(OUT_DIR) $(PROTO_PATH)
```
Note that `OUT_DIR` should be inside the current working dir, or mounted as separated volume, otherwise the generated code will be only present in the container.