Skip to content

Commit a689380

Browse files
authored
Document how to generate dependencies (#13)
* Document how to generate dependencies Signed-off-by: Pavol Loffay <ploffay@redhat.com> * Change find command Signed-off-by: Pavol Loffay <ploffay@redhat.com>
1 parent 4657ff1 commit a689380

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,25 @@ $ docker run --rm jaegertracing/protobuf --help
5757

5858
Example for Java:
5959
```
60-
docker run --rm -v${PWD}:{PWD} -w${PWD} jaegertracing/protobuf:latest --proto_path=${PWD} \
60+
docker run --rm -u $(id -u) -v${PWD}:${PWD} -w${PWD} jaegertracing/protobuf:latest --proto_path=${PWD} \
6161
--java_out=${PWD} -I/usr/include/github.com/gogo/protobuf ${PWD}/model.proto
6262
```
6363

6464
CLI options:
6565
- `--proto_path`: The path where protoc should search for proto files
6666
- `--java_out` : Generate Java code in the provided path
67+
68+
#### Generate dependencies
69+
70+
The generated code might require dependencies on packages like GoGo or Swagger.
71+
The code for these modules can be also generated by using this docker image:
72+
73+
```
74+
docker run --rm -u $(id -u) -v${PWD}:${PWD} -w${PWD} jaegertracing/protobuf:latest --proto_path=${PWD} \
75+
--java_out=${PWD} /usr/include/github.com/gogo/protobuf/gogoproto/gogo.proto
76+
```
77+
78+
Use this command to find the path to proto files included in the image:
79+
```
80+
docker run --rm -it --entrypoint=/bin/sh jaegertracing/protobuf:latest -c "find /usr/include -name *.proto"
81+
```

0 commit comments

Comments
 (0)