I’m trying to run a docker command inside of my build image. Bazel is running the docker command with the following invocation and error:
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; mkdir docker && cp -L receiver/Dockerfile bazel-out/local-fastbuild/bin/receiver/src/receiver/receiver.a bazel-out/local-fastbuild/bin/receiver/src/receiver/receiver docker && docker build docker -t gyroscope-receiver-dev > bazel-out/local-fastbuild/genfiles/receiver/docker_output'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Are y’all doing something magic to docker commands to get them to connect to the remote host or should /var/run/docker.sock be enough to trigger it? I have a
run: docker build foo command that is working fine running before this one executed by bazel fails.