2015-10-13 31 views
2

要在Bluemix中创建Docker容器,我们需要安装容器插件和容器扩展。安装容器延长后泊坞窗应该运行,但它显示的错误为:在Bluemix中创建Docker容器时出错

[email protected] 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 

高管:“泊坞窗”:$ PATH中找不到可执行文件

请建议我应该怎么去旁边。

+0

你能编辑你的问题,以便清楚你运行的命令是什么,输出是什么,......? –

+0

它看起来像你的码头没有正确配置。你可以尝试运行任何docker命令吗?像“码头形象”或“码头PS”? –

回答

0

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

尝试运行:

sudo docker restart 

如果您刚刚安装搬运工,你可能需要先重新启动计算机。

2

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

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

意味着找到可执行docker

因此,以下内容应告诉您它位于何处,并且需要附加到PATH环境变量。

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

这是什么会做的是搜索文件系统的根目录文件,名为“码头工人”,并具有可执行位而忽略错误信息设置并返回到文件为$ dockerpath的绝对路径。然后它暂时输出。

+0

需要注意的另一件事:*选项1)该选项允许您使用'cf ic'来管理IBM Containers上的容器*告诉您使用IBM的Docker包装器。 –

+0

它仍然工作 – Shru

相关问题