Managing Data Operating System
Also available as:
PDF
loading table of contents...

Test the local Docker registry

After configuring the local Docker registry, you can push Docker images to the registry so that when a service definition uses an image with that registry prefix, YARN can use the image from the local registry instead of the default public location.

  1. Build, tag, and push a Docker image to the registry by using docker commands.
    The following example shows the use of the respective commands on an image named myImage:
    docker build -t myImage:1 .
    docker tag myImage:1 <registryHost>:5000/myImage:1
    docker push <registryHost>:5000/myImage:1
  2. View the pushed image with the help of REST commands.
    The following example shows the use of curl commands to view the image named myImage:
    curl <registryHost>:5000/v2/_catalog
    curl <registryHost>:5000/v2/_catalog/myImage/tags/list
  3. Download the image to all the hosts in the cluster.
    Note
    Note
    This step is required to only to demonstrate connectivity. Docker and YARN automatically pull images from the specified registry path.
    The following example shows how you can download the image named myImage to all the hosts in your cluster:
    pssh -i -h hostlist -l user1 -x "-i ~/user1.pem" "sudo docker pull <registryHost>:5000/myImage:1"