docker-bench-security icon indicating copy to clipboard operation
docker-bench-security copied to clipboard

Error connecting to docker daemon

Open LeoCBS opened this issue 10 years ago • 3 comments

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 ⇒ 

LeoCBS avatar Mar 10 '16 16:03 LeoCBS

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.

joharohl avatar Mar 10 '16 17:03 joharohl

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.

konstruktoid avatar Mar 11 '16 20:03 konstruktoid

Closing due to inactivity.

konstruktoid avatar Jan 24 '17 15:01 konstruktoid