zouz@zouz:~$ docker -v
Docker version 20.10.8, build 3967b7d28e
zouz@zouz:~$ sudo docker info
Client:
Context: default
Debug Mode: false
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
and everytime i run docker i get this error.
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
help is appreciated.
2
Answers
I was able to solve the connectivity problem with the .sock by touching some configuration files
In /etc/init/docker.conf file changed the variable "DOCKER_SOCKET" to the path where my sock is running
then in the /lib/systemd/system/docker.socket file in the variable
We also change the value of ListenStream to the same path of the sock that we have put in the previous file
when we have the two files changed and saved we can restart the services.
if you are facing following error when running docker –
or
Run following commands
The reason is that you are trying to use systemd command to manage services on Linux but your system doesn’t use systemd and (most likely) using the classic SysV init (sysvinit) system.
run following command to confirm if its above case
so now you check again the status using
you can start docker using the following command
for more detail pls refer following link
https://linuxhandbook.com/system-has-not-been-booted-with-systemd/