简体   繁体   中英

Pull image from Docker Hub in OpenShift online

I want to test an ubuntu desktop image from docker hub. The problem is the image runs as the 'root' user which is not permitted by the cluster administrator. How to resolve this problem? Thank you.

At first glance it would seem that this is not possible. See this blog from Red Hat. https://blog.openshift.com/deploying-images-from-dockerhub/

There is says as follows:

In such a case you would need to build (if you are the owner) or rebuild (if you just want to use someone's image) the image to not expect to be run as root.

However, in another blog post from Red Hat I found that OpenShift will try and pull the image from the Docker Hub automatically (if it meets certain requirements?).

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

I your case it would seem that OpenShift does not want to deploy the image from 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"

Another image I tried from the Docker Hub did work in this way:

$ 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

It would seem that you will have to create your own docker image and try to deploy that on Openshift Online.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM