在执行 docker run 操作的时候,一直报如下错误:
[[email protected] 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 的位置:
[[email protected] vagrant]# cat /usr/lib/systemd/system/docker.service | grep prox --userland-proxy-path=/usr/libexec/docker/docker-proxy-current
创建一条软连接到 /usr/bin/ 下:
[[email protected] vagrant]# ln -s /usr/libexec/docker/docker-proxy-current /usr/bin/docker-proxy
重新执行操作:
[[email protected] vagrant]# docker run --name redis-6379 -p 6379:6379 -d --rm daocloud.io/library/redis 516049b733070354a177dba57fbe402fd4c0e47682ce4660275e18ffcbb58342
以上.
原文地址:https://www.cnblogs.com/cxbhakim/p/9149596.html
时间: 2024-10-02 06:35:01