4

How do you have to create an application from an image which is pulled from a remote repository. So I have an image pulled from the repo ec2.xxx:5000.

docker pull ec2.xxx:5000/myimage

The pull was successfully. When I perform docker images I see the pulled image

But I'm unable to perform the following:

oc new-project myproject
oc new-app ec2.xxx:5000/myimage

Than I get:

The 'new-app' command will match arguments to the following types:

  1. Images tagged into image streams in the current project or the 'openshift' project
     - if you don't specify a tag, we'll add ':latest'
  2. Images in the Docker Hub, on remote registries, or on the local Docker engine
  3. Templates in the current project or the 'openshift' project
  4. Git repository URLs or local paths that point to Git repositories

Can someone explain me how to create an application from such an image?

blong
  • 2,815
  • 8
  • 44
  • 110
  • This looks like a bug - what you provided should have been interpreted as an image. Can you provide the "oc version" output here? – Clayton Dec 24 '15 at 02:00
  • Can you try `oc new-app kubernetes/guestbook This will see if you can even pull and run from dockerhub. The container should run but the app will not be complete because we are not pulling a DB container. I just want to see if you can pull from any registry that isn't in openshift – TheSteve0 Dec 26 '15 at 06:00
  • What type of OpenShift setup are you using? An all-in-one setup or a master with multiples nodes? When you are saying that 'docker pull ec2.xxx:5000/myimage' works, with which Docker daemon are you interacting in this case? – Hardy Dec 29 '15 at 19:18
  • @Clayton The output of oc version gave: oc v1.1.0.1-1-g2c6ff4b kubernetes v1.1.0-origin-1107-g4c8e6f4 –  Dec 30 '15 at 08:56
  • @TheSteve0 Found Docker image a49fe18 (14 months old) from Docker Hub.. So yes it's possible to pull from other registries. (the manual pull of the image of my private docker repo is also possible). It's also possible to start a container with my image by performing: docker run -d ec2.xxx:5000/myimage (and that's) working so it's really an openshift issue –  Dec 30 '15 at 08:58
  • @all it's also working when I'm pulling the image from my private docker registry. After that I pushed it to my repo on docker hub and pulled it again from docker hub. Than I was able to create the app (than the tag of my image changed to docker.io/dockerusername/myimage. –  Dec 30 '15 at 09:02
  • https://github.com/openshift/origin/issues/6516 –  Dec 30 '15 at 09:05
  • @Hardy I've performed the advanced installation of OpenShift Origin 3.1 using ansible. I have 1 master and multiple nodes. The private docker registry (so not the registry of openshift) is on another server (not a node of openshift). And yes the manual pull of the image is possible after performing a docker login ec2.xxx:5000 –  Dec 30 '15 at 09:13
  • 1
    oc new-app myregistry:5000/example/myimage seems just not to work for me. Also not when I try to create an app with an image of my OpenShift registry. so 172.30.x.x/test/test –  Dec 30 '15 at 13:44

0 Answers0