Docker build error: "failed to dial gRPC"

When running docker build,

docker build -f dockerfile -t mything:v1 .

you might get following "strange" error:

ERRO[0004] failed to dial gRPC: unable to upgrade to h2c, received 500
context canceled

The issue here is caused by OS mismatch between target OS specified in dockerfile and curretnlly running container OS on you machine.
For example, if container OS is Linux and building image in dockerfile is Windows, then this error will happen.


comments powered by Disqus