1

enter image description here

I trying this method, but docker deamon don't working and give me error on pic bottom. Reboot and logout/login also doesn't help me. With 'sudo' all nice working, but i can't use docker in vs-code and docker-desktop without non-root method. !HELP!)

enter image description here

  • Is the daemon running? `systemctl status dockerd` – tkausl Jul 03 '22 at 11:53
  • The daemon is not started. Run `sudo service docker start` (or the equivalent for the distribution in use). – Turing85 Jul 03 '22 at 11:54
  • 2
    Please read: [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) – Turing85 Jul 03 '22 at 11:55
  • 1
    You say something about "this method", but you seem to have attached two images to the question in place of describing what you've done and what the error message is. Can you [edit] the question to include a [mcve], including your actual source code, the commands you've run, and the error messages you get, all as plain text? If this is just about running the Docker daemon also consider asking on a more appropriate site like [unix.se] and reviewing [How to fix docker: Got permission denied issue](https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue). – David Maze Jul 03 '22 at 11:56
  • @tkausl termial give: Unit dockerd.service could not be found. – Alexey Razmanov Jul 03 '22 at 12:05
  • Try using `docker` instead of `dockerd`, don't remember which name the service has. – tkausl Jul 03 '22 at 12:06
  • @Turing85 after your command, i try `docker version` and get `Cannot connect to the Docker daemon at unix:///home/kurama/.docker/desktop/docker.sock. Is the docker daemon running?` – Alexey Razmanov Jul 03 '22 at 12:07
  • Give the daemon a moment to start up. If `sudo service docker status` shows the service in `Running` state, `docker version`, `docker ps`, ... should work. – Turing85 Jul 03 '22 at 12:09
  • @tkausl afrer `systemctl status docker` i get ● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2022-07-03 14:37:30 +03; 31min ago – Alexey Razmanov Jul 03 '22 at 12:11
  • @DavidMaze I want to use docker in rootless mode, but i can't do this, after commands from official docs. https://docs.docker.com/engine/install/linux-postinstall/ – Alexey Razmanov Jul 03 '22 at 12:13
  • @Turing85, `sudo version docker status` give me `Running`, but `docker version` and `docker ps` give me `Cannot connect to the Docker daemon at unix:///home/kurama/.docker/desktop/docker.sock. Is the docker daemon running?` – Alexey Razmanov Jul 03 '22 at 12:18

3 Answers3

4

You have either set DOCKER_HOST or configured a context.

unset DOCKER_HOST
docker context use default
BMitch
  • 231,797
  • 42
  • 475
  • 450
  • The explanation of why would require copy and pasting from a picture. [Please do not upload images of code/errors when asking a question.](//meta.stackoverflow.com/q/285551) and let me know when that's done so I can clarify this answer. – BMitch Jul 03 '22 at 13:51
0

It's probably because you are in wsl and the interaction with the system is different, to get around that I used the dockerd command in other terminal

Hikachu
  • 302
  • 1
  • 9
0

You need to put your user in the docker group.

sudo usermod -aG docker $USER
Shachar297
  • 599
  • 2
  • 7