Docker Community Forums

Share and learn in the Docker community.

Docker ps is empty but containers are running

Hello everyone,

hopefully you have an idea for my creapy problem.

We have a single docker instance running on a ubuntu 20.04 server.

Today we made some apt upgrades, nothing special, and rebooted the device. After that there where a sleep-“crash” and we had to shutdown the system by unplug the powercable.
Now ofter restarting the machine everything seems to be fine, all docker-based services are running again and are reachable but:

  • portainer doesn’t find any docker containers/images/networks.
  • docker ps -a don’t find any running containers.
  • but systemctl status docker lists all docker-proxys
  • when i create a new hello world container it is listed in portainer and docker ps

For me i looks like that “the old” docker.sock is crashed or something like that.
So how can a make docker find the “old” containers, images and so on again which a there oviously but not visible?

Best regards and thanks for help

You observed the impossible :slight_smile:

Are you sure that only one Docker engine is running? A couple of days ago a forum member had the snap package and the package from docker’s official repos installed at the same time - both running side by side…

Thanks for your hint.

I remove the snap package and reinstalled the apt package via

apt --reinstall install docker-ce docker-ce-cli

Now some containers are still running but using “docker ps” i get

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

I have docker.sock files in /var/run and /run.

Any ideas how to go further?

ok restarting the machine instaed of restarting just services helped obviously. :slight_smile:

Everything is fine again.
Thanks for supoprt