2016-02-11 75 views
2

我試圖與Bluemix使用以下命令進行遠程打造泊塢窗圖像:泊塢窗基礎上Bluemix集裝箱找不到Dockerfile

cf ic build -t dude -f docker/production/Dockerfile . 

但是我一直收到錯誤消息:

Sending build context to Docker daemon 32.57 MB 
Error response from daemon: Build aborted with error: "filename 'Dockerfile' not found" 

Dockerfile移至項目的根部最初看起來像懸掛着,但似乎確實成功。

根據documentation docker build命令被支持,因此我期望-f選項也可以工作。也許情況並非如此?

任何想法或其他誰設法得到這個工作?這裏是碼頭工人的版本信息:

# docker version 
Client: 
    Version:  1.9.1 
    API version: 1.21 
    Go version: go1.4.3 
    Git commit: a34a1d5 
    Built:  Fri Nov 20 17:56:04 UTC 2015 
    OS/Arch:  darwin/amd64 

Server: 
    Version:  3.0 
    API version: 1.20 
    Go version: 
    Git commit: 
    Built:  2016-02-10T16:22:49 
    OS/Arch:  Bluemix Containers/ 
+0

什麼版本的Docker安裝在您的Bluemix實例上? ('docker version') – VonC

+0

@VonC,我用'docker version'信息更新了這個問題。現在我已經創建了一個腳本,它將暫時將正確的環境Dockerfile移動到可以工作但仍然令人討厭的項目根目錄中。 – krsyoung

+0

docker/production/Dockerfile是相對於當前文件夾的路徑嗎?如果是的話,它應該是碼頭運行上下文的一部分。 – VonC

回答

1

閱讀該文檔在

https://console.ng.bluemix.net/docs/containers/container_cli_reference_cfic.html#container_cli_reference_cfic__build

我想這-f選項不被CF尚未支持IC CLIIBM Bluemix Containers。 反正你有使用泊塢窗機命令上Bluemix的機會,通過CF IC登錄這裏

https://console.ng.bluemix.net/docs/containers/container_cli_ov.html#container_cli_ov

Whenever possible, run docker commands as for example docker run During login, copy and paste the environment variables that are provided in the terminal. DOCKER_HOST sets the Docker host to IBM Containers. DOCKER_CERT_PATH sets the location of the authentication keys for the IBM Containers plug in for Cloud Foundry. DOCKER_TLS_VERIFY uses TLS and verifies the remote server. Then, you can use the Docker CLI directly for the current session to run supported Docker commands. Some exceptions require the use of cf ic commands to perform tasks specific to IBM Containers, such as setting a namespace.

描述根據的是,登錄後,你可以切換本地運行docker引擎轉換爲Bluemix註冊表(並返回)設置值

DOCKER_HOST (和DOCKER_CERT_PATH/DOCKER_TLS_VERIFY,但這些值不會更改)

由CF IC登錄的輸出建議的值(和原來的值切換回本地環境)

+0

嗯,做這個工作時,你嘗試了嗎?我只是試圖''通過'cf ic'使用'docker'和 – krsyoung

+0

我沒有試過,但支持切換到docker 什麼可能是不支持的docker選項,它取決於 - Bluemix docker引擎版本 - Bluemix禁用特定功能碼頭選項 –