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 publicly available registries such as the Google Container Registry and others.
If you want to enrich your career and become a professional in Docker, then visit Tekslate - a global online training platform: "Docker Training" This course will help you to achieve excellence in this domain.
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
$ 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"}}'
OpenShift refers to the integrated registry by its service IP address, so if you decide to delete and recreate the docker-registry service, 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.
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.yamlService
there, and change its ClusterIP
to the address noted in above.Create the registry using the modified registry.yaml:
$ oc create -f registry.yamlYou liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.