4.6.1 Adding Registries

Oracle Container Runtime for Docker provides the option to connect to multiple registries to pull container images by configuring a registry list. By default, the Docker Engine is configured to pull images directly from the Docker Hub if no additional registries have been defined. You can configure a registry list to specify multiple registries that can be queried sequentially to pull an image. This can be used to configure the Docker Engine to first attempt to pull an image from a local registry and then fall back to an alternate registry, such as the Oracle Container Registry, before finally using the configured default registry. This is achieved by setting the add-registry option in /etc/docker/daemon.json.

...
  "add-registry": [
    "container-registry.oracle.com"
  ],
...

If you are creating this file from scratch with just the add-registry option, it would look like this:

{
  "add-registry": [
    "container-registry.oracle.com"
  ]
}

You can add multiple registries by appending the domain or domains you would like to add to the same list:

...
  "add-registry": [
    "container-registry.oracle.com",
    "registry.example.com"
  ],
...

Restart the Docker Engine service to apply your change:

# systemctl restart docker