exec: "docker-proxy": executable file not found in $PATH

时间:2021-12-25 04:36:18

在执行 docker run 操作的时候,一直报如下错误:

[root@etcd1 vagrant]#  docker run --name redis-6379 -p 6379:6379 -d --rm daocloud.io/library/redis
9e3e4650004bfd68030ea23c4a1e300556721c516160464afe45554b2184c111
/usr/bin/docker-current: Error response from daemon: driver failed programming external connectivity on endpoint redis-6379 (78ec2496afe55876e51d8e062bb09a6fcda7f36e292b99ad902efc27c65aa555): exec: "docker-proxy": executable file not found in $PATH

  

可知,启动需要执行 /usr/bin/docker-proxy

查看下 docker-proxy 的位置:

[root@etcd1 vagrant]# cat /usr/lib/systemd/system/docker.service | grep prox
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current \

  

创建一条软连接到 /usr/bin/ 下:

[root@etcd1 vagrant]# ln -s /usr/libexec/docker/docker-proxy-current /usr/bin/docker-proxy

  

重新执行操作:

[root@etcd1 vagrant]#  docker run --name redis-6379 -p 6379:6379 -d --rm daocloud.io/library/redis
516049b733070354a177dba57fbe402fd4c0e47682ce4660275e18ffcbb58342

  

以上.