Bug 1277572 - [RFE] Docker search is unable to search images in an Atomic OpenShift Registry.
[RFE] Docker search is unable to search images in an Atomic OpenShift Registry.
Status: NEW
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE (Show other bugs)
3.0.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Michal Minar
Johnny Liu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-03 09:57 EST by Eric Jones
Modified: 2017-04-12 04:35 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
OpenShift Enterprise 3.0
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Jones 2015-11-03 09:57:17 EST
Description of problem:
Docker search does not return the contents of the internal docker registry.

Version-Release number of selected component (if applicable):
$ oc version
oc v3.0.2.0-17-g701346b
kubernetes v1.1.0-alpha.0-1605-g44c91b1

$ sudo docker version
Client version: 1.7.1
Client API version: 1.19
Package Version (client): docker-1.7.1-115.el7.x86_64
Go version (client): go1.4.2
Git commit (client): 446ad9b/1.7.1
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Package Version (server): docker-1.7.1-115.el7.x86_64
Go version (server): go1.4.2
Git commit (server): 446ad9b/1.7.1
OS/Arch (server): linux/amd64

These are the versions for both the customer's environment as well as my test environment.

How reproducible:
100%

Steps to Reproduce:
1. vim /etc/sysconfig/docker
      OPTIONS='--selinux-enabled'
      ADD_REGISTRY='--add-registry 10.1.1.2'
      INSECURE_REGISTRY='--insecure-registry 10.1.1.2:5000'
2. systemctl restart docker
3. oc login -u eric
4. oc new-project test
5. oc whoami -t
6. docker login -u eric -e erjones@redhat.com -p <token> 10.1.1.2:5000
7. docker pull registry.access.redhat.com/openshift3/ose-haproxy-router
8. docker tag registry.access.redhat.com/openshift3/ose-haproxy-router    
     10.1.1.2:5000/test/ose-haproxy-router
9. docker push 10.1.1.2:5000/test/ose-haproxy-router
10. docker search test
or 
11. docker search test/ose-haproxy-router
or 
12. docker search ose-haproxy-router

Actual results:
Error response from daemon: invalid registry endpoint https://10.1.1.2/v0/: unable to ping registry endpoint https://10.1.1.2/v0/
v2 ping attempt failed with error: Get https://10.1.1.2/v2/: dial tcp 10.1.1.2:443: connection refused
 v1 ping attempt failed with error: Get https://10.1.1.2/v1/_ping: dial tcp 10.1.1.2:443: connection refused. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 10.1.1.2` 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/10.1.1.2/ca.crt


Expected results:
The image stored in the internal registry.
Comment 2 Michal Fojtik 2016-07-20 07:11:10 EDT
Trello card was created:

https://trello.com/c/G8IpzYuj/758-add-docker-registry-search-api
Comment 3 Ryan Howe 2017-01-18 16:17:01 EST
Hi,

This bug should be renamed. 

docker search does not work with the v2 registry which is implemented in OpenShift. 

Proposal 
https://github.com/docker/distribution/issues/206

Docker search cli

https://github.com/docker/docker/blob/master/client/image_search.go#L48-L51

Docker distribution v2 registry does not have these api endpoints

https://github.com/docker/distribution/blob/master/registry/api/v2/descriptors.go
Comment 4 Ryan Howe 2017-01-18 16:20:26 EST
Actual results would be 

Error response from daemon: Unexpected status code 404

Note You need to log in before you can comment on or make changes to this bug.