Sign inSign up

qarlm/protoc

By qarlm

•Updated about 6 years ago

A protoc and grpc compiler in docker, so that you don't have to futz with libs

Image
1

810

qarlm/protoc repository overview

⁠Protocol Buffers + Docker

A lightweight protoc Docker image, published as qarlm/protoc to Docker Hub⁠, with all dependencies built-in, to generate code in multiple languages. Forked from https://github.com/jaegertracing/docker-protobuf⁠.

⁠Purpose

gogoproto annotations in proto files help make internal domain model types more efficient in golang, but using these proto files to generate code in other languages requires to include these dependencies anyway. The Dockerfile in this repo compiles all dependencies into the image, for easy code generation in multiple languages.

⁠Contents

Dockerfile configured with dependencies specific to the ML projects.

⁠What's included in the image

⁠Supported languages

  • C#
  • C++
  • Go
  • Java / JavaNano (Android)
  • JavaScript
  • Objective-C
  • PHP
  • Python
  • Ruby

⁠Usage

$ docker run \
        --rm \
        -v$(PWD):/protos \
        qarlm/protoc \
        --working-dir /protos
        --language <lang>
        --grpc

For help try:

$ docker run --rm qarlm/protoc --help
⁠To generate language specific code
  1. Make sure you have the model.proto file present in ${PWD}

  2. Use any of the language specific options -

    --language python
    --language ruby
    --language java
    --langauge python,ruby,java

Example for Java:

docker run \
   --rm \
   -v${PWD}:/protos \
   qarlm/protoc:latest \
       --working-dir /protos
       --language java
       --grpc

Tag summary

Content type

Image

Digest

Size

48.5 MB

Last updated

about 6 years ago

docker pull qarlm/protoc