1

I deleted docker with:

sudo snap remove docker --purge

Then, I install docker following the doc guide (this)

All looks fine, but when I do:

$ docker -v
-bash: /snap/bin/docker: No such file or directory

It's like it still look for it in snap.

I tried:

$ sudo snap refresh --list

But doesn't work. Any idea?

AssertionError
  • 136
  • 1
  • 10
  • So you followed the guide. Performed all the steps including `sudo docker run hello-world` and everything looks fine. But when you do `docker -v`, you get an error? –  Jan 04 '22 at 10:13
  • `sudo docker run hello-world` works, but `docker -v` doesn't – AssertionError Jan 04 '22 at 10:19
  • So root is OK, but the user has some weird settings. Probably an `alias` set in the shell. Try experimenting with https://snapcraft.io/docs/commands-and-aliases ... probably something about `snap unalias`. –  Jan 04 '22 at 10:31

1 Answers1

1

It seems that the problem is for alias. try this command whereis docker the output is some thing like this:

docker: /usr/bin/docker /etc/docker /usr/libexec/docker /usr/share/man/man1/docker.1.gz

now set new alias to docker.

alias docker='/usr/bin/docker'

try again the problem should be solved.

rezshar
  • 570
  • 1
  • 6
  • 20