Docker Community Forums

Share and learn in the Docker community.

Docker don't get any response in Linux

I installed docker a few moth ago on mxlinux to use nginx for hosting flutter web. Everything was good. After a while I need my docker so when I run docker ps in terminal the command stuck here:

alt@mx-alt:~$ docker ps

Nothing is shown, even an error.

docker help or docker version are not response like above.

I checked it’s services and docker service is working :

alt@mx-alt:~
$ sudo service docker status
[ ok ] Docker is running.
alt@mx-alt:~

This is result of ps command:

alt@mx-alt:~
$ ps aux | grep docker
root 2547 0.0 0.6 2554716 103100 ? Sl 12:51 0:00 /usr/bin/dockerd -p /var/run/docker.pid
root 2857 0.0 0.3 1122380 52476 ? Ssl 12:51 0:00 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
alt 5395 0.0 0.3 757444 62736 pts/0 Sl+ 13:49 0:00 docker ps
alt 5597 0.0 0.0 73084 892 pts/2 S+ 13:50 0:00 grep docker
alt@mx-alt:~

I stopped docker service :

alt@mx-alt:~

$ docker version

Client: Docker Engine - Community

Version: 20.10.1

API version: 1.41

Go version: go1.13.15

Git commit: 831ebea

Built: Tue Dec 15 04:34:48 2020

OS/Arch: linux/amd64

Context: default

Experimental: true

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

alt@mx-alt:~

Any idea?

I found the cause of the issue:

After an hour debug, it turns out that I only need to change the app host to 0.0.0.0. Maybe when mapping port, docker default will be 0.0.0.0, since when I run command docker-compose ps, the PORTS column of each container has format 0.0.0.0: -> . I don’t know this is the cause of the issue or not, but I did it and the problem is solved

Unfortunately I did not have time to debug the problem so I clean installed my Linux and I installed again docker.

Its a stolen response from https://stackoverflow.com/a/51296716/3460948. Lewish95 is a bot.

The details from the first post don’t provide any details to work with. Your commands lack the prepended sudo in fron of the docker command, though docker ps without it should at least indicate that the client could not connect to the docker daemon socket…

Agree, the bahavior looks strange. If I where you I would start checking all sorts of logs to gather more evidence.