執行docker run所遇到的問題

axcvbs發表於2020-10-05

[root@centos]#  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 的位置:

1

2

[root@centos]# cat /usr/lib/systemd/system/docker.service | grep prox

          --userland-proxy-path=/usr/libexec/docker/docker-proxy-current \

 

 

建立一條軟連線到 /usr/bin/ 下:

1

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

  

重新執行操作:

1

2

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

516049b733070354a177dba57fbe402fd4c0e47682ce4660275e18ffcbb58342

相關文章