1. Proposed title of this feature request To be able to pull image from openshift registry using registry's service name 2. Who is the customer behind the request? Account: name AXA Technology Services SAS TAM customer: yes SRM customer: no idea Strategic: yes 3. What is the nature and description of the request? docker pull using IP:port "172.30.23.108:5000/aem-build/aem-cq:latest" succeeds This works, but to have the IP there is no good idea. First I want to create templates that we can use in different OpenShift environments and also in the same environment, the IP could change. The skydns name of the docker-registry should be used, which is the same in all environments. I tested with: - "image": "test-build/test-cq:latest" (no IP at all) Result: Failed to pull image "test-build/test-cq:latest": Error: image test-build/test-cq:latest not found - "image": "docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest" Result: Failed to pull image "docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest": image pull failed for docker-registry.default.svc.cluster.local:5000/test-build/test-cq:latest, this may be because there are no credentials on this request. details: (API error (500): invalid registry endpoint https://docker-registry.default.svc.cluster.local:5000/v0/: unable to ping registry endpoint https://docker-registry.default.svc.cluster.local:5000/v0/ v2 ping attempt failed with error: Get https://docker-registry.default.svc.cluster.local:5000/v2/: Forbidden v1 ping attempt failed with error: Get https://docker-registry.default.svc.cluster.local:5000/v1/_ping: Forbidden. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry docker-registry.default.svc.cluster.local:5000` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/docker-registry.default.svc.cluster.local:5000/ca.crt 4. Why does the customer need this? (List the business requirements here) It's kind of annoying to use the IP address, because: - We have 4 environments, so a different IP for docker registry in each environment. We are using templates to create objects (is, bc, dc, ...). So we need to do additional effort to parameterize the docker registry IP. - With every update of OpenShift (3.0.1 to 3.0.2, 3.0.2 to 3.1.0) or sometimes also after fixing problems by RedHat, the docker registry IP changes and existing objects (dc) need to be updated with the changed IP, which also needs additional effort. 5. How would the customer like to achieve this? (List the functional requirements here) Not given. 6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. We will check by pulling image from openshift registry using it's service name 7. Is there already an existing RFE upstream or in Red Hat Bugzilla? No 8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)? Not specified. 9. Is the sales team involved in this request and do they have any additional input? No idea 10. List any affected packages or components. Registry, Docker registry 11. Would the customer be able to assist in testing this functionality if implemented? Likely
This sounds like you wan to expose the registry through a route: https://docs.openshift.com/enterprise/3.0/install_config/install/docker_registry.html#exposing-the-registry Does that solve the problem?
Related issue: https://github.com/openshift/origin/issues/8581
The referenced issues has been resolved. @miheer can you confirm that way this is resolved as mentioned in comment [1] is sufficient? You should be able to pull and push using docker-registry service name (e.g. registry.default.svc:5000/develop/simple-ruby:latest). Nevertheless, resulting image in image stream will be still tagged with service IP. [1] https://github.com/openshift/origin/issues/8581#issuecomment-239880317
Confirmed with OCP3.4, we can reference unsecure registry with stable name: [root@zhouy testjson]# oc get is NAME DOCKER REPO TAGS UPDATED ruby-22-centos7 docker-registry.default.svc:5000/zytest/ruby-22-centos7 latest Less than a second ago ruby-ex docker-registry.default.svc:5000/zytest/ruby-ex
Thanks!
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:0066