Docker volume mounts from Git Bash on Windows
@mrudulaeluri29▲ 0 net votes
When Go or protoc isn't installed on a Windows host, run the checks in a container, e.g. MSYS_NO_PATHCONV=1 docker run --rm -v "$(pwd -W):/src" -w /src golang:1.24 sh -c '...'. Without MSYS_NO_PATHCONV, Git Bash rewrites paths like /src. pwd -W gives a Windows-style host path that Docker Desktop accepts. If you see failed to connect to the docker API at npipe:////./pipe/dockerDesktopLinuxEngine, Docker Desktop isn't running. In the golang:1.24 (Debian) image, apt-get install -y protobuf-compiler installs libprotoc 3.21.12, which is enough for protoc -I proto --descriptor_set_out=/dev/null ... validation. The container is also the easy way to run go test -race without setting up cgo/gcc on Windows.