

Note: In case firewall is enabled on your private registry server then open 80 port using the following command ~]# firewall-cmd -permanent -add-port=80/tcp ~]# docker psĬONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESīf8e703b0149 registry "/entrypoint.sh /e." 5 minutes ago Up 5 minutes 0.0.0.0:5000->5000/tcp registry Now start the registry container using below command ~]# docker run -dit -p 5000:5000 -name registry registryīf8e703b0149211bb923beeb042f8e656bf407b21646f101eb58e0acd4409c24Ībove Command will start the registry container with name registry and also we set the patting rule so that if any request comes to ‘ ‘ on 5000 port then request will be redirected to registry container on 5000 port. Once the image is downloaded verify which commands will be executed when we start registry container image. Let’s first download the registry container using beneath command ~]# docker pull registry That Program or script is started by running a docker registry container. Next task is to start the program or script which will configure and make your server as Registry Server. In case Docker is not installed please refer the below I am assuming Docker package is already installed on it and its service is up and running. Login to the server which you want to configure as Docker Private Registry Server, in my case it is “”. Perform the following steps to setup our own Docker Private Registry as per above discussed scenario Step:1 Download and start registry Container on your private registry server Note : Update the /etc/hosts file in case DNS server is not configured so that servers can be reachable with their respective hostname or dns name.ġ92.168.0.60 docker-repoġ92.168.0.70 dkengine1ġ92.168.0.80 dkengine2 -> On this Server we will download docker container images from our own private registry server with ‘ docker pull‘ command.

Below are the details of my three servers: I will be using three CentOS 7.x Servers and assuming docker is already installed and its service is up and running on all three servers.

In this article I will demonstrate how to setup our own Docker private registry on CentOS 7.x / RHEL 7.x. Docker Registry or repository is a place where Docker container images are stored. 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.

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.
