I'm trying to deploy on an Openshift Origin Pod an image which is available in my Docker repository:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
tomcat9demo latest 535da1774da0 9 weeks ago 350.2 MB
When running:
$ oc new-app tomcat9demo --name tomcatdemo
Apparently it seems to find the image from the Docker repository:
--> Found Docker image 535da17 (9 weeks old) from for "tomcat9demo:latest"
* This image will be deployed in deployment config "tomcat9demo"
* Port 8080/tcp will be load balanced by service "tomcat9demo"
* Other containers can access this service through the hostname "tomcat9demo"
* WARNING: Image "tomcat9demo:latest" runs as the 'root' user which may not be permitted by your cluster administrator
--> Creating resources with label app=tomcat9demo ...
deploymentconfig "tomcat9demo" created
service "tomcat9demo" created
--> Success
However the status shows an error. It seems there's an error with the image pull:
$ oc get pods
NAME READY STATUS RESTARTS AGE
tomcat9demo-1-zrj98 0/1 ErrImagePull 0 16s
$ oc status
Error from server: the server could not find the requested resource
Do I need something else to grab the image from my local Docker repository ?
You need to specify the option --docker-image for it to point to your local image repo. Example:
oc new-app tomcat9demo --docker-image tomcat9demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With