A lightweight, multi-platform Docker image for the Protocol Buffer Compiler (protoc)
5.7K
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.
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
Images are available from Docker Hub and GitHub Container Registry.
See Docker Hub tags for available versions and the build workflow for build status.
This image packages protoc from Google's Protocol Buffers project. See LICENSE for the included license text.
Content type
Image
Digest
sha256:80356c434…
Size
7.2 MB
Last updated
4 months ago
docker pull yusoltsev/protoc