Joxit/docker-registry-ui

Docker Registry >=2.8 sets catalog max entries to 1000

HighOnMikey opened this issue · 3 comments

For anyone using Docker Registry >=2.8: You need to either change the configuration of the Docker Registry or the UI, as the Docker Registry now defaults the maximum entries per page to 1000.

This Docker Registry configuration option does not appear to be documented in the registry repo or docs.docker.com/registry.

You will see this error from the registry:
Code: PAGINATION_NUMBER_INVALID
Message: invalid number of results requested
Detail: n: 100000

Option 1: Docker Registry reconfiguration

Option 1a: YAML config

/etc/docker/registry/config.yml

# ...
catalog:
  maxentries: 100000
# ...

reference:
https://github.com/distribution/distribution/blob/f7717b7855ca44bef5b8ccb293927a83c1d68600/configuration/configuration.go#L271

Option 1b: Environment variable

REGISTRY_CATALOG_MAXENTRIES=100000

reference:
https://docs.docker.com/registry/configuration/#override-specific-configuration-options

Option 2: UI reconfiguration

Environment variable

CATALOG_ELEMENTS_LIMIT=1000

reference:

- `CATALOG_ELEMENTS_LIMIT`: Limit the number of elements in the catalog page (see [#39](https://github.com/Joxit/docker-registry-ui/issues/39), [#127](https://github.com/Joxit/docker-registry-ui/pull/127) and [#132](https://github.com/Joxit/docker-registry-ui/pull/132)). (default: `100000`). Since 1.4.9

Change Hard-coded default

Set to 1000:

this.state.catalogElementsLimit = props.catalogElementsLimit || 100000;

Joxit commented

Hi, thank you for using my project and posting issues! 🥰

Thanks for this information, I will reduce the catalog element limit in the next release and add your information about the registry configuration!

Thank you so much for this, CATALOG_ELEMENTS_LIMIT did the trick, until this is fixed in the next release.

Joxit commented

Hi there ! The fix has bee published ! You can use the tag main or wait until I publish the next version 2.5.0 (I still have some stuff to do)

I've included some error message too for this particular use case 😉