2015-10-13 92 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

相關問題