在Bluemix中创buildDocker容器时出错

要在Bluemix中创build一个Docker容器,我们需要安装容器插件和容器扩展。 安装容器扩展后,Docker应该正在运行,但是显示错误:

root@oc0608248400 Desktop]# cf ic login ** Retrieving client certificates from IBM Containers ** Storing client certificates in /root/.ice/certs Successfully retrieved client certificates ** Checking local docker configuration Not OK Docker local daemon may not be running. You can still run IBM Containers on the cloud There are two ways to use the CLI with IBM Containers: Option 1) This option allows you to use `cf ic` for managing containers on IBM Containers while still using the docker CLI directly to manage your local docker host. Leverage this Cloud Foundry IBM Containers plugin without affecting the local docker environment: Example Usage: cf ic ps cf ic images Option 2) Leverage the docker CLI directly. In this shell, override local docker environment to connect to IBM Containers by setting these variables, copy and paste the following: Notice: only commands with an asterisk(*) are supported within this option export DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443 export DOCKER_CERT_PATH=/root/.ice/certs export DOCKER_TLS_VERIFY=1 Example Usage: docker ps docker images 

exec:“docker”:在$ PATH中找不到可执行文件

请提出下一步该怎么去。

错误已经告诉你该怎么做:

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

意味着find可执行的docker

因此,下面的内容应该告诉你它在哪里,需要附加到PATH环境variables。

 dockerpath=$(dirname `find / -name docker -type f -perm /a+x 2>/dev/null`) export PATH="$PATH:$dockerpath" 

这将做的是search名为“docker”的文件的文件系统的根目录,并设置可执行位,同时忽略错误消息,并以$ dockerpath的forms返回文件的绝对path。 然后暂时输出。

问题似乎是你的docker守护进程没有运行。

尝试运行:

 sudo docker restart 

如果您刚刚安装了docker,则可能需要先重新启动机器。