鍍金池/ 問答/Linux/ exec: "docker-proxy": executab

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

頭一次使用docker 找了一個(gè)鏡像docker.io/skiychan/nginx-php7 打算部署容器。

于是開始執(zhí)行:

sudo docker run --name nginx -p 8080:80 -d skiychan/nginx-php7

提示內(nèi)容如下

ARN[0025] Failed to allocate and map port 8080-8080: exec: "docker-proxy": executable file not found in $PATH
ERRO[0026] Handler for POST /v1.26/containers/nginx/start returned error: driver failed programming external connectivity on endpoint nginx (ea9b65d1a1a18b7b1c1869141a9005c5bf71501edea5b5c27ba37f4047147d7c): exec: "docker-proxy": executable file not found in $PATH
Error response from daemon: driver failed programming external connectivity on endpoint nginx (ea9b65d1a1a18b7b1c1869141a9005c5bf71501edea5b5c27ba37f4047147d7c): exec: "docker-proxy": executable file not found in $PATH
Error: failed to start containers: nginx

看提示是缺少docker-prxoy這個(gè)可執(zhí)行文件,而且端口分配失敗,容器也啟動(dòng)失敗。
但我每次執(zhí)行 docker start nginx 的時(shí)候卻輸出:

WARN[0031] Failed to allocate and map port 8080-8080: Bind for 0.0.0.0:8080 failed: port is already allocated
ERRO[0031] Handler for POST /v1.26/containers/nginx/start returned error: driver failed programming external connectivity on endpoint nginx (5c4718d32721fe466a9b400216913898eb8b7909f1ce73188e8db360cb55ff19): Bind for 0.0.0.0:8080 failed: port is already allocated
Error response from daemon: driver failed programming external connectivity on endpoint nginx (5c4718d32721fe466a9b400216913898eb8b7909f1ce73188e8db360cb55ff19): Bind for 0.0.0.0:8080 failed: port is already allocated
Error: failed to start containers: nginx

看樣子端口已經(jīng)分配了,但容器還是啟動(dòng)失敗的樣子。

求解如何使用docker,docker是yum安裝在centos上的 版本號(hào)為:1.13.1。

回答
編輯回答
撿肥皂

/usr/libexec/docker

我看這個(gè)目錄里有這幾個(gè)可執(zhí)行文件 是否是需要在/usr/bin 下面建立軟連接?

2017年7月1日 10:02
編輯回答
櫻花霓

一樣的問題
whereis docker-proxy
docker-proxy: /usr/bin/docker-proxy
軟連接或者配置到path里面,試一下。

2017年6月7日 16:13