在线从OpenShift中的Docker Hub中提取图像

时间:2018-05-16 11:09:06

标签: openshift dockerhub openshift-online

我想从docker hub测试一个ubuntu桌面映像。问题是图像作为“root”用户运行,而集群管理员不允许这样做。 如何解决这个问题? 谢谢。

1 个答案:

答案 0 :(得分:0)

乍看之下,这似乎是不可能的。请参阅Red Hat的此博客。 https://blog.openshift.com/deploying-images-from-dockerhub/

有如下说法:

  

在这种情况下,您需要构建(如果您是所有者)或重建(如果您只想使用某人的映像)该映像,而不希望它作为root用户运行。

但是,在Red Hat的另一篇博客文章中,我发现OpenShift会尝试自动从Docker Hub中提取图像(如果满足某些要求?)。

https://blog.openshift.com/getting-any-docker-image-running-in-your-own-openshift-cluster/

我的情况是,OpenShift似乎不想从Docker Hub部署映像。

$ oc new-app umis/xubuntu-office-xrdp-desktop
error:  local file access failed with: CreateFile umis/xubuntu-office-xrdp-desktop: Het systeem kan het opgegeven pad niet vinden.
error: unable to locate any images in image streams, templates loaded in accessible projects, template files, local docker images with name "umis/xubuntu-office-xrdp-desktop"

我从Docker Hub尝试过的另一张图片也以这种方式工作:

$ oc new-app sonatype/nexus3
--> Found Docker image f2014d3 (2 months old) from Docker Hub for "sonatype/nexus3"
    * An image stream will be created as "nexus3:latest" that will track this image

似乎您将不得不创建自己的docker映像并尝试将其部署在Openshift Online上。