Sign inSign up

yusoltsev/protoc

By yusoltsev

•Updated 4 months ago

A lightweight, multi-platform Docker image for the Protocol Buffer Compiler (protoc)

Image
0

5.7K

yusoltsev/protoc repository overview

⁠protoc

Build Status Docker Image (docker.io) Docker Image (ghcr.io) Docker Image Size

Run Google's Protocol Buffer Compiler (protoc) in a Docker container to generate code from .proto files without installing the compiler on your host. Images are published for Linux AMD64 and ARM64.

⁠Usage

Put your .proto files in the current directory and run:

docker run --rm \
  --mount "type=bind,source=$PWD,target=/work" \
  --workdir /work \
  yusoltsev/protoc \
  --python_out=. example.proto

Replace --python_out=. with the output option for your target language. The image adds /include and the current directory to the import paths, so it can find bundled .proto includes and files mounted from your working directory.

To see the compiler options, run:

docker run --rm yusoltsev/protoc --help

⁠Image registries

Images are available from Docker Hub⁠ and GitHub Container Registry⁠.

See Docker Hub tags⁠ for available versions and the build workflow⁠ for build status.

⁠License and upstream

This image packages protoc⁠ from Google's Protocol Buffers project. See LICENSE⁠ for the included license text.

Tag summary

Content type

Image

Digest

sha256:80356c434…

Size

7.2 MB

Last updated

4 months ago

docker pull yusoltsev/protoc