Support for non Docker Hub registries in whalebrew search
superbrothers opened this issue · 12 comments
Currently, whalebrew search
command only supports Docker Hub. I want to search for whalebrew packages in other registries, such as the internal image registry.
https://github.com/whalebrew/whalebrew/blob/master/cmd/search.go#L40-L45
Or, I suppose tap
-ish feature (search among multiple image registry)
that's a nice feature, what registry would you be using?
I have been looking for the registry API and didn't find a way to discover images. It seems to be a feature related to the registry implementation
what registry would you be using?
We're using harbor in our internal environment.
Hello!
I have been thinking about this feature and have the following alpha proposal if you want to give it a try: https://github.com/whalebrew/whalebrew/tree/tap/docker-registry
You should be able to retrieve the binaries for a few weeks under this build https://github.com/whalebrew/whalebrew/actions/runs/330002075
Thank you very much for the effort!! It works like a charm ❤️
$ cat ~/.whalebrew/config.yaml
registries:
- dockerHub:
owner: whalebrew
# my dockerhub org
- dockerHub:
owner: everpeace
$ ./whalebrew-Darwin-x86_64 version
Whalebrew 0.2.4-6-ga23decb
$ ./whalebrew-Darwin-x86_64 search wget
whalebrew/wget
everpeace/whalebrew-wget
Great! thanks for the feedback.
How do you see the interface? (I mean the config file and its syntax)
Is it clear enough?
Do you have any use of private images?
I feel that the current interface does not have the flexibility to support other registries such as Quay. However, I couldn't find an API to search for images in the spec as an OCI registry. Is the image search API implemented independently by each registry?
feel that the current interface does not have the flexibility to support other registries such as Quay
Why do you say so?
In this branch, there are 2 providers supported:
- dockerhub
- dockerregistry
so you can configure to "search" on any docker registry. The search then would be performed by using the_catalog
endpoint and then filtering the results like${owner}/*${term}*
.
To use so, you should have, in your ~/.whalebrew/config.yaml
:
repositories:
- dockerRegistry:
host: my-docker-registry.example.com
owner: my-owner
In fact the plan is indeed to add support for several other registries in bd0a08d#diff-0994d3a5be96c2a3b13d814709806ef8c7013cca6bcfffa76fd176f056e31c60R38
couldn't find an API to search for images in the spec as an OCI registry
I didn't either, hence the use of _catalog
with plain docker registries
I take note of the interest for the GCP and AWS one, in addition to harbor.
Having a look at it, currently, OCI registry only offers the ability to discover tags for a given image.
We are interested in discovering images
I'm sorry. I missed the support for dockerregistry
.
We are interested in discovering images
The current interface is better because the OCI registry spec does not have the discovering images feature.
Hi! happy to announce you that this feature is now released in 0.2.5
with both additional docker hubs and any custom docker registries.
I take note of the requests to support additional registries, I will consider them progressively.
Feel free to contribute any registry you would like