Skip to content

hizzuu/protoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Docker Image for using Protoc configured in Go

This Docker image contains protoc-gen-go, protoc-gen-validate, and protoc-gen-doc
Please refer to the relevant project for the usage of each project.

Quick Start

Generage Go code by protocol buffer

docker run --rm --name protoc -v $(PWD)/gen/pb:/pb -v $(SCHEMA_PATH)/proto:/schema hizzuu/protoc \
	-I/schema \
	--go_out=plugins=grpc:/pb \
	user.proto

When using protoc-gen-validate

docker run --rm --name protoc -v $(PWD)/gen/pb:/pb -v $(SCHEMA_PATH)/proto:/schema hizzuu/protoc \
  -I/schema \
  -I/go/pkg/mod/github.com/envoyproxy/protoc-gen-validate@v0.6.2 \
  --go_out=plugins=grpc:/pb \
  --validate_out="lang=go:/pb" \
  user.proto

Generate Document by Protocol Buffers

docker run --rm -v ${PWD}:/proto hizzuu/protoc \
  -I/proto \
  -I/go/src/github.com/envoyproxy/protoc-gen-validate \
  --doc_out=. \
  --doc_opt=markdown,README.md \
  user.proto

Development

  1. Clone this repository
  2. Install dependencies using Docker build .

Docker Hub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published