docker-protobuf icon indicating copy to clipboard operation
docker-protobuf copied to clipboard

Adds Python support

Open nbareil opened this issue 8 years ago • 0 comments

Hello

It adds Python/gRPC support to the Docker image (cf #23).

Unfortunately, it adds 96 MB to the image size and the Docker build takes longer to compile everything.

$ docker images|grep /protoc
REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
nbareil/protoc                      latest              82c95d48ede8        16 minutes ago      298MB
znly/protoc                         latest              4933f5718377        4 months ago        202MB

Example of usage:

$ ls
bar.proto
$ mkdir auto
$ docker run --rm -v $(PWD):/protobuf/foo -u `id -u`:`id -g`  znly/protoc python2 \
                -m grpc_tools.protoc -I/protobuf  --python_out=/protobuf/foo/auto \
                --grpc_python_out=/protobuf/foo/auto /protobuf/foo/bar.proto

Best regards

nbareil avatar Oct 31 '17 13:10 nbareil