Question about configuration of registry using environment variables

Hello

My intention is to have most of configuration in environment variables and I am using the syntax described at github for docker distribution to override values in /etc/docker/registry/config.yml
In the documentation there is an example…

storage:
  filesystem:
    rootdirectory: /var/lib/registry

To override this value, set an environment variable like this:

REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere

This variable overrides the /var/lib/registry value to the /somewhere directory.

However I cannot get this syntax to work for config like …

notifications:
  endpoints:
    - name: alistener
      url: https://my.listener.com/event
      timeout: 1s
      ...

My question; Is it posible to override (or specify) a notification-endpoint using environment variables

I have tried a syntax on the docker run command like…

docker run -d  ... \
-e REGISTRY_NOTIFICATIONS_ENDPOINTS_NAME="- portus" \
-e REGISTRY_NOTIFICATIONS_ENDPOINTS_URL="http://portus.domain.com:3000/v2/webhooks/events" \
-e REGISTRY_NOTIFICATIONS_ENDPOINTS_TIMEOUT="500ms" \
...  registry

…but these environment settings does not override the endpoint configuration as I intend to. It is not working.

I realize that the notifications_endpoints config info is supposed to be an YML-array, and maybe I have to use a different syntax for this reason.

My question is: How could I specify YML-array config using environment variables?

1 Like

A shame nobody answered your question, as it is really important, and I would like to know it too, have you ever found a list of working env variables?