Hi @pseudomuto,
I am experiencing the below error while trying to use the protoc-gen-doc plugin in my own dockerized CentOS container.
[root@203ba962febd repo]# ./protoc --plugin=protoc-gen-doc=/var/repo/protoc-gen-doc --doc_out=./grpc_doc --doc_opt=html,index.html service/*.proto
./protoc-gen-doc: program not found or is not executable
--doc_out: protoc-gen-doc: Plugin failed with status code 1.
Both protoc and protoc-gen-doc binaries are present in the working directory
I have the following simple usecase:
My objective is to have the protoc-gen-doc binary which has been compiled and installed on my local machine ported over for usage in a docker container.
Using go, compile and install protoc-gen-doc
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
Copy over the binary from the GOPATH/bin location into my directory used for creating container
cp $GOPATH/bin/protoc-gen-doc /
Create docker image and run the container to test the binary which is copied over
The dir structure of my working directory inside the container looks like belo
rwxr-xr-x 1 root root 4.4M Dec 14 21:52 protoc
-rwxr-xr-x 1 root root 7.4M Dec 14 21:50 protoc-gen-doc
drwxr-xr-x 2 root root 4.0K Dec 14 19:09 service/
service/ dir contains the .proto files
Next I run the protoc command as above providing the plugin path, but end up with the error shown
[root@203ba962febd repo]# ./protoc --plugin=protoc-gen-doc=/var/repo/protoc-gen-doc --doc_out=./grpc_doc --doc_opt=html,index.html service/*.proto
./protoc-gen-doc: program not found or is not executable
--doc_out: protoc-gen-doc: Plugin failed with status code 1.
NOTES/FYI:
The plugin works perfectly well on my local machine
The plugin works if I install the binary using : go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc INSIDE the container
The problem is seen only when I am copying over the binary from my local to the container.
Can you help understand this behavior? Is there a reason why the I can't simply port the binary plugin?
I am not too familiar with go.
Hi @pseudomuto, I am experiencing the below error while trying to use the protoc-gen-doc plugin in my own dockerized CentOS container. [root@203ba962febd repo]# ./protoc --plugin=protoc-gen-doc=/var/repo/protoc-gen-doc --doc_out=./grpc_doc --doc_opt=html,index.html service/*.proto ./protoc-gen-doc: program not found or is not executable --doc_out: protoc-gen-doc: Plugin failed with status code 1.
Both protoc and protoc-gen-doc binaries are present in the working directory
I have the following simple usecase: My objective is to have the protoc-gen-doc binary which has been compiled and installed on my local machine ported over for usage in a docker container.
Using go, compile and install protoc-gen-doc go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
Copy over the binary from the GOPATH/bin location into my directory used for creating container cp $GOPATH/bin/protoc-gen-doc/
Create docker image and run the container to test the binary which is copied over
The dir structure of my working directory inside the container looks like belo rwxr-xr-x 1 root root 4.4M Dec 14 21:52 protoc -rwxr-xr-x 1 root root 7.4M Dec 14 21:50 protoc-gen-doc drwxr-xr-x 2 root root 4.0K Dec 14 19:09 service/
service/ dir contains the .proto files
NOTES/FYI:
Can you help understand this behavior? Is there a reason why the I can't simply port the binary plugin? I am not too familiar with go.
I did see that a similar issue was reported here https://github.com/pseudomuto/protoc-gen-doc/issues/345 but the resolution provided has not helped me.
Greatly appreciate any help regarding this.
Thanks!
Deepak