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

Add a local Docker registry

You can create a local Docker registry on your Hadoop cluster so that users can download Docker images locally.

This procedure does not include the steps to configure security options for the registry, and therefore, is not recommended in a production environment.
  1. On the master node, create an instance of the Docker registry container.
    The following example shows the command to create the Docker registry container and bind the registry to port 5000 on the master node:
    docker run -d -p 5000:5000 --restart=always --name registry -v /mnt/registry:/var/lib/registry registry:2 
  2. Configure each of the cluster hosts to skip HTTPS checks.
    The following example shows commands to skip HTTPS checks on CentOS 7 hosts:
    pssh -i -h hostlist -l user1 -x "-i ~/user1.pem" "sudo echo '{\"insecure-registries\": [\"<registryHost>:5000\"]}' | sudo tee --append /etc/docker/daemon.json"
    pssh -i -h hostlist -l user1 -x "-i ~/user1.pem" "sudo systemctl restart docker"
  3. Add the local Docker registry to the list of registries allowed by YARN.
    1. In the Ambari web, select Services > YARN > Advanced to view the YARN advanced properties.
    2. Expand Advanced Container Executor and add <registryHost>:5000 to the list of specified container executor values.