Changing the local Docker registry endpoint

Use this procedure to configure the delegate host with the endpoint of the local Docker registry. Unless the master host is configured with an alternative local Docker registry, which is rare, the endpoint is the master host's hostname or IP address and port 5000.
The following configuration variable identifies the local Docker registry endpoint:
SERVICED_DOCKER_REGISTRY
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.

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:5000 with the endpoint of the local Docker registry.
      If the master host is configured with an alternative local Docker registry, use the same endpoint here. Otherwise, just replace localhost with the IP address or hostname of the Control Center master host.
    5. Save the file, and then close the editor.
  3. Verify the settings.
    grep -E '^\b*SERVICED' /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:
      --insecure-registry=Registry-Endpoint
    3. Save the file, and then close the editor.
  5. Restart the Docker service.
    systemctl restart docker