docker registry - Deploying a modified Jenkins image in openshift fails -


i used "jenkins-1-centos7" image deploy in openshift run projects on jenkins image. worked , after many configurations, duplicated new image out of jenkins container. want use image used base further development, deploying pod on image fails error "errimagepull".

on investigations, found openshift needs image present in docker registry in order deploy pods successfully. deployed app docker registries, when try push updated image docker registry fails message "authentication required". i've given admin privileges user.

docker push <local-ip>:5000/openshift/<new-updated-image> push refers repository [<local-ip>:5000/openshift/<new-updated-image>] (len: 1) c014669e27a0: preparing unauthorized: authentication required 

how can make sure modified image gets deployed successfully?

probably answer need edits because issue can caused lot of things. (i assume using openshift origin? (opensource)). because see centos7 image jenkins.

first off need deploy openshift registry in default project.

$ oc project default $ oadm registry --config=/etc/origin/master/admin.kubeconfig \     --service-account=registry   

a registry pod deployed. above registry created service (sort of endpoint function loadbalancer above pods).

this service has ip inside 172.30 range. can check ip in webconsole or perform (assuming you're still in default project): $ oc svc

name              cluster-ip      external-ip   port(s)                   age docker-registry   172.30.22.11   <none>        5000/tcp                  8d kubernetes        172.30.32.13      <none>        443/tcp,53/udp,53/tcp     9d router            172.30.42.42    <none>        80/tcp,443/tcp,1936/tcp   9d 

so you'll need use service ip of docker-registry authenticate. you'll need token:

$ oc whoami -t d_opnwldgebikjzvg1fm9dydx.. 

now you're able perform login , push image:

$ docker login -u admin -e any@mail.com \ -p d_opnwldgebikjzvg1fm9dydx 172.30.22.11:5000 warning: login credentials saved in /root/.docker/config.json login succeeded  $ docker tag myimage:latest 172.30.22.11/my-proj/myimage:latest  $ docker push 172.30.22.11/my-proj/myimage:latest 

hope helps. can give feedback on answer , tell if works or new issues you're facing.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -