Work-m8 / backstage-docker-plugin

Backstage plugin to list Docker images
2 stars 2 forks source link

[Docker V2] Support private distribution repo #13

Open Skiepp opened 1 month ago

Skiepp commented 1 month ago

This plugin can list docker images from DockerHub only.

It will be great to have it support private registries (non-docker hub) as well, which is the de-facto standandard for enterprise companies.

Documentation: https://distribution.github.io/distribution/spec/api/

Basically the api call changes from: /docker/v2/namespaces/${url.organization}/repositories/${url.repository}/tags

To: /docker/v2/${image_name}/tags/list

As for the authentication, it can be done by using an Oauth2 Bearer token, just like DockerHub

pascalwilbrink commented 1 month ago

Thank you for your request:) I will take a look at it

pascalwilbrink commented 1 month ago

Hi @Skiepp,

can you try this version? https://www.npmjs.com/package/@workm8/backstage-docker-tags/v/1.1.0-alpha

You can specify the Registry like following:

metadata:
  name: Grafana
  annotations:
    docker.com/repository: 'grafana/grafana'
    docker.com/registry: 'Docker'

Currently, you can choose between Docker and GitHub (Case sensitive).

Skiepp commented 1 month ago

Hi @pascalwilbrink Thanks for reaching me so fast! 🥇

Can you check if the package had been correctly pushed to npm? I cannot see the "dist" folder inside the package.


In addition, how are used the Docker and GitHub options? If I understand correctly:

Wouldn't be better something like:

It's just a suggestion to make the configuration easier to read.


Is the code in the CNCF_HTTP_API branch? I can help you if you need, I just need a little hint on how to build it

Thanks a lot, Skiepp