See this github issue: https://github.com/grpc/grpc/issues/18338
See this example repo: https://github.com/slolife/alpine-protoc
If I include the Grpc.Tools 1.19.0 nuget package in a project, which adds a build step <Protobuf Include="Test.proto" />
This works fine if I create a docker image to build and use the microsoft/dotnet:2.2-sdk
as the build image. However, if I try to use the alpine based microsoft/dotnet:2.2-sdk-alpine
build image, the build fails with the following error message:
/root/.nuget/packages/grpc.tools/1.19.0/build/_protobuf/Google.Protobuf.Tools.targets(263,5): error MSB6003: The specified task executable "/root/.nuget/packages/grpc.tools/1.19.0/tools/linux_x64/protoc" could not be run. No such file or directory [/src/alpine-protoc.csproj]
I confirmed that the protoc
file is in the location that the error message is complaining about.
I tried running apk add libc6-compat
and re-running the build. This time I got the following error:
/root/.nuget/packages/grpc.tools/1.19.0/build/_protobuf/Google.Protobuf.Tools.targets(263,5): error MSB6006
: "/root/.nuget/packages/grpc.tools/1.19.0/tools/linux_x64/protoc" exited with code 139. [/src/alpine-proto
c.csproj]
Update:
Output from ldd protoc
~/.nuget/packages/grpc.tools/1.19.0/tools/linux_x64 # ldd protoc
/lib64/ld-linux-x86-64.so.2 (0x7f60935a7000)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f60935a7000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f60935a7000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f60935a7000)
ldd <protoc executable>
? – Tumescent