Sign inSign up

yusoltsev/protoc

By yusoltsev

•Updated 20 days ago

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

Image
0

6.9K

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. New stable upstream releases (≥22.0) are automatically synced and published weekly.

⁠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 sync workflow⁠ for publication status. Version tags match upstream releases (for example, v22.0); latest tracks the newest stable version.

⁠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:d0c30287f…

Size

7.3 MB

Last updated

20 days ago

docker pull yusoltsev/protoc