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:

Log in to the delegate host as root, or as a user with superuser privileges.

Edit the Control Center configuration file.

Open /etc/default/serviced in a text editor.

Locate the line for the SERVICED_DOCKER_REGISTRY variable, and
then make a copy of the line, immediately below the original.

Remove the number sign character (#) from the beginning of the line.

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.

Save the file, and then close the editor.

Verify the settings.

grep -E '^\b*SERVICED' /etc/default/serviced

Add the insecure registry flag to the Docker configuration file.

Open /etc/sysconfig/docker in a text editor.

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

Note: Use a space character () to separate flags, and make sure
the double quote character (") delimits the declaration of
OPTIONS.