From 30b8cd153109e8645fa0978f5baf5f2da2625f38 Mon Sep 17 00:00:00 2001 From: Bjarne Sievers Date: Wed, 6 Oct 2021 21:25:18 +0200 Subject: [PATCH] Add info about docker pitfalls to README (#258) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index eeb76b8..cbb7e4f 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,10 @@ docker pull fullstorydev/grpcurl:latest # Run the tool docker run fullstorydev/grpcurl api.grpc.me:443 list ``` +Note that there are some pitfalls when using docker: +- If you need to interact with a server listening on the host's loopback network, you must specify the host as `host.docker.internal` instead of `localhost` (for Mac or Windows) _OR_ have the container use the host network with `-network="host"` (Linux only). +- If you need to provide proto source files or descriptor sets, you must mount the folder containing the files as a volume (`-v $(pwd):/protos`) and adjust the import paths to container paths accordingly. +- If you want to provide the request message via stdin, using the `-d @` option, you need to use the `-i` flag on the docker command. ### Other Packages