0

Recently installed Docker on Ubuntu 19.04 disco running on VMWare for testing. On top of it, I am running malice (https://github.com/maliceio/malice). When I scan a sample using command

malice scan [binary] it shows the following error: Unable to connect to docker client

Would appreciate a response

0

Verify that dockerd is running

Assuming docker in installed (sudo apt install docker.io or like this), you should see a running daemon in the process list:

$ ps axuf | grep docker
root       7694  0.2  0.2 1932540 75504 ?       Ssl  Apr28   4:19 /usr/bin/dockerd -H fd://
root       7721  0.2  0.1 1917924 38596 ?       Ssl  Apr28   3:12  \_ docker-containerd --config /var/run/docker/containerd/containerd.toml --log-level info

If not, try to start/restart the daemon with:

$ sudo systemctl restart docker

$ systemctl show docker | grep State
StateDirectoryMode=0755
LoadState=loaded
ActiveState=active
SubState=running
...

If the daemon fails to start, check the output of journalctl -u docker for error messages.

Add user to group

The user you are working with, must be in the docker group. Check you current group membership with:

$ groups
username adm cdrom sudo dip plugdev lpadmin sambashare docker

If you are not part of the docker group add you current user with:

$ sudo adduser $(whoami) docker

Logout and login again for the changes to take effect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.