Docker daemon keeps shutting down

  docker, docker-compose, fedora

I am trying to work with docker: build, tag, and deploy images but the daemon keeps shutting down. The workaround is to run sudo systemctl restart docker again and again to do something.

I read few answers pertaining to docker containers but I could not find any solution to docker daemon.

The error that I get from time to time:

➜  opendatahub-operator git:(master) ✗ sudo docker build --no-cache . 
ERRO[0009] failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: connection refused 
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I tried updating the system (sudo dnf update) and there were long pending changes but it had no effect on docker’s behavior.

Source: Docker Questions