[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

cannot create app with docker hub private image

I'm trying to create a simple app using one image from docker hub private repo but the command fails with following error

$ oc new-app <image_name> --name testapp
error: no image or template matched "<image_name>"

If i create another app using public image, it works correctly

$ oc new-app google/nodejs-hello -n testapp2
Service "testapp2" created at with port mappings 8080.
Run 'oc status' to view your app.

The only difference is that the first image is a private image and second one is public.

from the documentation here: https://docs.openshift.com/enterprise/3.0/dev_guide/image_pull_secrets.html#allowing-pods-to-reference-images-from-other-secured-registries, i understand that imagepullsecrets are required for accessing private docker hub repos. So i did the following

$ oc secrets new-dockercfg mysecret.dockerhub --docker-server=https://index.docker.io/v1/ --docker-username=<username> --docker-password=<pass> --docker-email=<email>

$ oc secrets add serviceaccount/default secrets/mysecret.dockerhub --for="">
$ oc secrets add serviceaccount/builder secrets/mysecret.dockerhub

The app creation still fails with the same error.

Really appreciate any help on this.


Devashish Meena / Tech Lead
+1 206-605-8586 
Suite 420, 1932 1st Ave,
Seattle, WA 98101

facebook twitter linkedin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]