0

When I write $ docker info I get:

Client:
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.10.4)

Server:
ERROR: Cannot connect to the Docker daemon at unix:///home/aotsaidera/.docker/desktop/docker.sock. Is the docker daemon running?
errors pretty printing info

Docker daemon is active and is listening at /var/run/docker.sock:

● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/docker.service.d
             └─options.conf
     Active: active (running) since Mon 2023-05-29 00:56:35 EEST; 7min ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 145146 (dockerd)
      Tasks: 12
     Memory: 20.2M
     CGroup: /system.slice/docker.service
             └─145146 /usr/bin/dockerd -H unix:// --containerd=/run/containerd/containerd.sock

май 29 00:56:34 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:34.750174683+03:00" level=warning msg="Your kernel does not support CPU realtime scheduler"
май 29 00:56:34 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:34.750210015+03:00" level=warning msg="Your kernel does not support cgroup blkio weight"
май 29 00:56:34 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:34.750224946+03:00" level=warning msg="Your kernel does not support cgroup blkio weight_device"
май 29 00:56:34 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:34.750478719+03:00" level=info msg="Loading containers: start."
май 29 00:56:35 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:35.005642810+03:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0>
май 29 00:56:35 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:35.103761508+03:00" level=info msg="Loading containers: done."
май 29 00:56:35 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:35.140482543+03:00" level=info msg="Docker daemon" commit="20.10.21-0ubuntu1~20.04.2" graphdriver(s)=o>
май 29 00:56:35 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:35.140516773+03:00" level=info msg="Daemon has completed initialization"
май 29 00:56:35 aotsaideraPC systemd[1]: Started Docker Application Container Engine.
май 29 00:56:35 aotsaideraPC dockerd[145146]: time="2023-05-29T00:56:35.153669850+03:00" level=info msg="API listen on /var/run/docker.sock"

I tried changing the path by following the steps here: https://geekflare.com/change-docker-sock-file-path/

When I entered $ sudo gedit /etc/init/docker.conf the file was empty, so I copied-pasted the one from the link and changed the path to /var/run/docker.sock but it didn't work and I left the file blank

Also tried pasting DOCKER_SOCKET = "/var/run/docker.sock" in

/etc/init/docker.conf but it didn't help

I am successfully connected to the docker API using Intellij, but can't figure out how to fix the socket path in the terminal

  • Isn't it `DOCKER_HOST`? – tadman May 28 '23 at 22:32
  • 1
    If you are using Docker Desktop on your linux workstation, please read this article: https://docs.docker.com/desktop/faqs/linuxfaqs/ >> While it’s possible to run both Docker Desktop and Docker Engine simultaneously, there may be situations where running both at the same time can cause issues... – Sergey K May 29 '23 at 06:09
  • Thank you! I was wondering why when I start Docker Desktop the `docker info` command stopped producing the error and connected, but when I shut it, the error reappeared. – Lachezar Kolev May 29 '23 at 08:31
  • If you have in fact installed Docker Desktop (the error message suggests that too), does [Docker not working without sudo in Ubuntu 22.04](https://stackoverflow.com/questions/73671461/docker-not-working-without-sudo-in-ubuntu-22-04) describe your problem, and does its accepted answer (`docker context use default`) work for you? – David Maze May 29 '23 at 10:48
  • Yes, it describes my problem and the accepted answer works for me. Sorry that I didn't find the linked thread and I am sorry for the duplicate question – Lachezar Kolev May 29 '23 at 13:05

0 Answers0