How to Setup Docker Private Registry on CentOS 7.x / RHEL 7.x

Whenever we install Docker on CentOS or RHEL Servers Docker public Registry is enabled so when we run docker pull or docker search command it will go to Docker public registry (Docker Hub) and will fetch the required container images. But it is not idea to fetch the Docker container images from public registry when you are using Docker in an organization, for the best practice we should have our own private Docker registry or repository. Docker Registry or repository is a place where Docker container images are stored.