See buf.gen.yaml
. Managed mode is officially recommended.
To create selfhosting image, you can read this below;
bufbuild docker image with protoc
Buf's image does not contain protoc, and this is on purpose - specific generation plugins you need (including protoc, which contains the plugins for java, cpp, etc) need to be handled by you. We'll be dealing with this ourselves in the future Buf Schema Registry, but for local generation, you are responsible for your own plugin versioning and installation. I'd recommend creating your own Docker image for this.
First, edit buf yamls (buf.gen.yaml
, buf.work.yaml
, buf.yaml
)
Then
docker-compose up
Finally, you'll get proto files in /gen
.
- Multistaging build
- use Ubuntu for installing grpcio in pip
- Use managed plugins
- later