2016-07-19 73 views
0

我試圖在OpenShift Online(下一代)上從here部署Ubuntu鏡像。這些都是我也跟着這樣做從公共註冊表導入Docker鏡像到OpenShift

$ oc new-project test 
$ oc new-app jedisct1/phusion-baseimage-latest 

I then deployed from the WebConsole 

但是我得到一個失敗的部署和錯誤狀態的步驟莢頁上的「圖像回拉斷」。我可能做錯了什麼特別的事情?

下面是整個過程的日誌。

[email protected]:~# oc new-project test 
Now using project "test" on server "https://api.preview.openshift.com:443". 

You can add applications to this project with the 'new-app' command. For example, try: 

    $ oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-hello-world.git 

to build a new hello-world application in Ruby. 

[email protected]:~# oc new-app jedisct1/phusion-baseimage-latest 
--> Found Docker image 7ff0885 (14 hours old) from Docker Hub for "jedisct1/phusion-baseimage-latest" 

    * An image stream will be created as "phusion-baseimage-latest:latest" that will track this image 
    * This image will be deployed in deployment config "phusion-baseimage-latest" 
    * The image does not expose any ports - if you want to load balance or send traffic to this component 
     you will need to create a service with 'expose dc/phusion-baseimage-latest --port=[port]' later 
    * WARNING: Image "phusion-baseimage-latest" runs as the 'root' user which may not be permitted by your cluster administrator 

--> Creating resources with label app=phusion-baseimage-latest ... 
    imagestream "phusion-baseimage-latest" created 
    deploymentconfig "phusion-baseimage-latest" created 
--> Success 
    Run 'oc status' to view your app. 

[email protected]:~# oc status 
In project test on server https://api.preview.openshift.com:443 

dc/phusion-baseimage-latest deploys istag/phusion-baseimage-latest:latest 
    deployment #1 pending on image or update 

1 warning identified, use 'oc status -v' to see details. 

[email protected]:~# oc status -v 
In project test on server https://api.preview.openshift.com:443 

dc/phusion-baseimage-latest deploys istag/phusion-baseimage-latest:latest 
    deployment #1 pending on image or update 

Warnings: 
    * dc/phusion-baseimage-latest has no readiness probe to verify pods are ready to accept traffic or ensure deployment is successful. 
    try: oc set probe dc/phusion-baseimage-latest --readiness ... 

View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'. 

[email protected]:~# oc status -v 
In project test on server https://api.preview.openshift.com:443 

dc/phusion-baseimage-latest deploys istag/phusion-baseimage-latest:latest 
    deployment #2 running for 2 minutes - 1 pod 
+0

你可以做「碼頭拉jedisct1/phusion-baseimage-latest」嗎? –

+0

不,不是。但我想繞過碼頭的任何東西 –

+0

您在webconsole的事件中看到清單中未知的清單嗎?我讀了一個'錯誤'與拉圖像不是版本1.9或更高版本的碼頭(我能夠在碼頭上拉圖像) – lvthillo

回答

0
1. using Docker < 1.10 pull the image 

2. tag it either as 

    docker.io/<yourname>/imagename 

    or 

    ${INTERNAL_DOCKER_REGISTRY_IP}/openshift/imagename 

3. push it using the same tag 

4. deploy from that 

使用泊塢窗< 1.10,你可以肯定的是,推形象會模式V1是導入的都是由當前的註冊表版本和泊塢窗1.9。

拉取圖像並不成問題,因爲Docker集線器將其即時轉換爲與集線器上摘要不同的摘要的架構v1。所以如果你嘗試使用這個摘要,你會失敗,因爲它沒有存儲在集線器上。因此,部署者將失敗,因爲碼頭工不能提取給定的摘要。

基本上,只要你使用docker < 1.10就可以將它推到任何地方,這樣你就可以確保結果圖像清單是模式v1的 - 這樣的清單可以被任何版本的OpenShift和docker安全地使用。

另類視角

您也可以將其與任何你想要的搬運工版本推到OpenShift在線。由於OpenShift的註冊表僅存儲v1模式。然後參考Docker Hub上的推送圖像,而不是原始來源。

2

我試圖在Openshift在線也拉相同的圖像,我發現了一個「明顯的未知錯誤」。

enter image description here

這是一個兼容性問題DockerHub,如克萊頓在這個答案的狀態。

API error (500): manifest unknown: manifest unknown

+0

你有沒有成功拉過任何其他的Ubuntu鏡像? –

相關問題