pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.59k stars 462 forks source link

example on how to handle shell expansion of a `*` char in protos path with container image #467

Open hellt opened 2 years ago

hellt commented 2 years ago

The readme mentions:

NOTE: Due to the way wildcard expansion works with docker you cannot use a wildcard path (e.g. protos/.proto) in the file list. To get around this, if no files are passed, the container will generate docs for protos/.proto, which can be changed by mounting different volumes.

Although to overcome this limitation, the provided container can be used as such:

docker run --rm \
  -v $(pwd)/doc:/out \
  -v $(pwd):/protos \
  --entrypoint '' \
  pseudomuto/protoc-gen-doc \
  bash -c "protoc -I /protos --doc_out=/out /protos/ndk/*.proto"