• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Docker Registry

Docker containers and their usage have revolutionized the way applications and the underlying operating system are packaged and deployed to development, testing and production systems.

Docker Hub is the original registry for Docker container images and it is being joined by more and more other publicly available registries such as the Google Container Registry and others.

Docker Registry

  • Storage for the Registry
  • Maintaining the Registry IP Address

To deploy the integrated Docker registry, use the oadm registry command as a user with cluster administrator privileges.

For example:

$ oadm registry –config=/etc/origin/master/admin.kubeconfig \

–credentials=/etc/origin/master/openshift-registry.kubeconfig \

–images=’registry.access.redhat.com/openshift3/ose-${component}:${version}’

This creates a service and a deployment configuration, both called docker-registry. Once deployed successfully, a pod is created with a name similar to docker-registry-1-cpty9.

To see a full list of options that you can specify when creating the registry:

$ oadm registry --help

Storage for the Registry

The registry stores Docker images and metadata. If you simply deploy a pod with the registry, it uses an ephemeral volume that is destroyed if the pod exits. Images anyone has built or pushed into the registry would disappear.

For production use, attach a remote volume or define and use the persistent storage method of your choice.

Example:To use an existing persistent volume claim:

$ oc volume deploymentconfigs/docker-registry --add --name=v1 -t pvc \
 --claim-name=<pvc_name> --overwrite

Or, to attach an existing NFS volume to the registry:
$ oc volume deploymentconfigs/docker-registry \
     --add --overwrite --name=registry-storage --mount-path=/registry \
     --source='{"nfs": { "server": "<fqdn>", "path": "/path/to/export"}}'

Inclined to build a profession as Docker Developer? Then here is the blog post on Docker Training

Maintaining the Registry IP Address

OpenShift refers to the integrated registry by its service IP address, so if you decide to delete and recreate the docker-registryservice, you can ensure a completely transparent transition by arranging to re-use the old IP address in the new service. If a new IP address cannot be avoided, you can minimize cluster disruption by rebooting only the masters.

Re-using the Address

To re-use the IP address, you must save the IP address of the old docker-registry service prior to deleting it, and arrange to replace the newly assigned IP address with the saved one in the new docker-registry service.

 Note the ClusterIP for the service:

$ oc get svc/docker-registry -o yaml | grep clusterIP:

Delete the service:

$ oc delete svc/docker-registry dc/docker-registry

Create the registry definition in registry.yaml, replacing <options>

with,

example, those used in step 3 of the instructions in the  section:

$ oadm registry <options> -o yaml > registry.yaml

Edit registry.yaml, find the Service there, and change its ClusterIP to the address noted in above.

Create the registry using the modified registry.yaml:

$ oc create -f registry.yaml

For indepth understanding of Docker click on

Summary
Review Date
Reviewed Item
Docker Registry
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Docker Registry"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Site Disclaimer, Copyright © 2016 - All Rights Reserved.

    Support


    Please leave a message and we'll get back to you soon.

    I agree to be contacted via e-mail.