I first install docker through following command from docker site:
curl -s -O https://get.docker.com/builds/Linux/x86_64/docker-1.6.1 && chmod +x docker-1.6.1 && sudo mv docker-1.6.1 /usr/local/bin/docker
Then I remove the docker
in /usr/local/bin
directory.
I install docker
through yum
again, this time docker
is installed in /usr/bin
directory:
[root@dl380gen8snbjbb ~]# ls -lt /usr/bin/docker
-rwxr-xr-x 1 root root 13451927 Apr 20 13:44 /usr/bin/docker
When I execute docker
in command:
[root@dl380gen8snbjbb ~]# docker
-bash: /usr/local/bin/docker: No such file or directory
but the /usr/bin
is actually in PATH
:
[root@dl380gen8snbjbb ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
Why does the system doesn't seek docker
command in /usr/bin
directory?