Error connecting to docker daemon
Hi, clone docker compose and trying to run, got this error:
docker-compose run --rm docker-bench-security
.
.
.
Successfully built 345e17343307
Error connecting to docker daemon (does docker ps work?)
docker-bench-security|master ⇒ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
docker-bench-security|master ⇒
I had the same issue, and for me the problem was that the docker engine on the host was out of date.
If you change line 30 of docker-bench-security.sh from docker ps -q >/dev/null 2>&1 to docker ps -q to get a more specific error. Just remember to run docker-compose build before you run the run command again.
EDIT: Or RTD; at the bottom of the readme it says that you can run docker-bench-security.sh directly on the host. Requires root for some of the tests though.
Hi @LeoCBS, @joharohl is correct, there's most likely an issue with host-client mismatch. Please see https://github.com/docker/docker-bench-security/issues/90#issuecomment-189475262 regarding this.
Closing due to inactivity.