--
John Skarbek


On December 2, 2016 at 07:02:18, Thomas Diesler 
([email protected]<mailto:[email protected]>) wrote:

On 02 Dec 2016, at 12:57, Skarbek, John 
<[email protected]<mailto:[email protected]>> wrote:

On December 2, 2016 at 05:01:52, Thomas Diesler 
([email protected]<mailto:[email protected]>) wrote:
Folks,

I have a scenario where a maven build creates an image and pushes this to the 
local openshift docker repository. I’m then trying to use `oc new-app …` to 
create an application from that image. This fails because the image cannot be 
found on docker hub.

Is there a way to tell openshift to also look in it local repository where the 
image exists already?

Indeed!  From the help docs, you should run new-app like this:

  # Use a MySQL image in a private registry to create an app and override 
application artifacts' names

  oc new-app 
--docker-image=myregistry.com/mycompany/mysql<https://urldefense.proofpoint.com/v2/url?u=http-3A__myregistry.com_mycompany_mysql&d=DgMFaQ&c=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0&r=8IlWeJZqFtf8Tvx1PDV9NsLfM_M0oNfzEXXNp-tpx74&m=dpeIKZoMdzwR2k1WAnERa2ysEUmjLfCs9r2nlCazz6E&s=H-aCQiMhelrpnMIhWqUWnN4t5WCTI23lywwBsPcw-qc&e=>

I have the image in my local openshift registry already

[ec2-user@ip-172-30-0-66 wildfly-camel]$ docker images
REPOSITORY                         TAG                 IMAGE ID            
CREATED             SIZE
wildflyext/wildfly-camel           latest              b0a354ce295d        15 
hours ago        1.06 GB
jboss/wildfly                      10.1.0.Final        071c4a43ead0        13 
days ago         582.6 MB
openshift/origin-deployer          v1.3.0              5bf464732ca8        11 
weeks ago        487.1 MB
openshift/origin-docker-registry   v1.3.0              59d447094a3c        11 
weeks ago        345.5 MB
openshift/origin-haproxy-router    v1.3.0              e33d4e33dffb        11 
weeks ago        506.2 MB
openshift/origin                   v1.3.0              7b24611e640f        11 
weeks ago        487.1 MB
openshift/origin-pod               v1.3.0              35873f68181d        11 
weeks ago        1.591 MB

I would like `oc new-app wildflyext/wildfly-camel` to use that image and not go 
to 
hub.docker.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__hub.docker.com&d=DgMFaQ&c=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0&r=8IlWeJZqFtf8Tvx1PDV9NsLfM_M0oNfzEXXNp-tpx74&m=dpeIKZoMdzwR2k1WAnERa2ysEUmjLfCs9r2nlCazz6E&s=EnswWGPM02IdYT62aWgImG5-WPjAwfMhZXL8N-fEn-4&e=>

Openshift needs to talk to a registry in order to build an appropriate 
deployment configuration or image stream.  If you have built your image and 
it's pushed to the openshift docker registry, then you can utilize the service 
ip or an exposed route pointed to that openshift registry.

It's not possible take an image that's built locally and pass it into 
openshift.  An image stream would be missing critical information preventing 
them from having a way to pull down the image and start the container.  The 
screenshot you provided doesn't provide proof that you've pushed the image into 
any docker registry.





cheers
— thomas

_______________________________________________
users mailing list
[email protected]<mailto:[email protected]>
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openshift.redhat.com_openshiftmm_listinfo_users&d=DgIGaQ&c=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0&r=8IlWeJZqFtf8Tvx1PDV9NsLfM_M0oNfzEXXNp-tpx74&m=bHsKm1jYyc8z2aKvWT8EnfifZqrNYIBsUsWWceDKN_8&s=ijcti_roNOiv5pwjgkHD2PzNlChW9BWWzz6S6jhGzXg&e=


_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to