Configuring the local Docker registry

Use this procedure to configure the endpoint of the local Docker registry.
The following configuration variable identifies the local Docker registry endpoint:
Default: localhost:5000
The endpoint of the local Docker registry, which serviced uses to store internal services and application images.
If the default value is changed, the host's Docker configuration file must include the --insecure-registry flag with the same value as this variable.
The safest replacement for localhost is the IPv4 address of the registry host. Otherwise, the fully-qualified domain name of the host must be specified.

Perform these steps:

  1. Log in to the delegate host as root, or as a user with superuser privileges.
  2. Edit the Control Center configuration file.
    1. Open /etc/default/serviced in a text editor.
    2. Locate the line for the SERVICED_DOCKER_REGISTRY variable, and then make a copy of the line, immediately below the original.
    3. Remove the number sign character (#) from the beginning of the line.
    4. Replace localhost with the virtual IP address of the high-availability cluster (HA-Virtual-IP).
      The new variable value must include the delimiter (:) followed by the port number.
    5. Save the file, and then close the editor.
  3. Verify the settings in the serviced configuration file.
    grep -E '^\b*[A-Z_]+' /etc/default/serviced
  4. Add the insecure registry flag to the Docker configuration file.
    1. Open /etc/sysconfig/docker in a text editor.
    2. Add the local Docker registry endpoint to the end of the OPTIONS declaration.
      Replace Registry-Endpoint with the same value used for the SERVICED_DOCKER_REGISTRY variable:
    3. Save the file, and then close the editor.
  5. Restart the Docker service.
    systemctl restart docker