We can pretty much follow the excellent recipe of Nik van der Ploeg[1] for Ubuntu except adjusting file paths for nginx and tls/CA/certs according to RHEL7. See also the command update-ca-trust instead of update-ca-certificates on Ubuntu.
Unfortunately docker-registry from redhat does not seem to come direclty prepared for being searched. In order for tha search API-endpoint to work the following variables must be added to the file /etc/sysconfig/docker
SEARCH_BACKEND=sqlalchemy SQLALCHEMY_INDEX_DATABASE=sqlite:////tmp/docker-registry.db
It also turns out that the python module that actually does that work is not included in the dependency list of docker-registry, so it also needs to be installed.
[root@docker-registry lib]# yum install python-sqlalchemy
Check now that you do get some JSON and not 404 when
[root@docker-registry lib]# curl http://localhost:5000/v1/search
Now we can go on and add the local registry to /etc/sysconfig/docker of the hosts that will use it.
ADD_REGISTRY='--add-registry registry.access.redhat.com --add-registry docker-registry.uio.no:8080'
[1] https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-14-04
See also:
https://docs.docker.com/articles/certificates/
http://nategood.com/client-side-certificate-authentication-in-ngi
Logg inn for å kommentere