Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: service type dockerhub #207

Open
treezio opened this issue Feb 1, 2023 · 2 comments
Open

feat: service type dockerhub #207

treezio opened this issue Feb 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@treezio
Copy link

treezio commented Feb 1, 2023

Context

There are some repositories in github that are not managing their versions using the releases feature such as https://github.com/confluentinc/kafka-images but still publishing their images on dockerhub.

Goal

It would be nice to being able to use the dockerhub (it could be extended to other repositories) image tags from a given repository as the released versions.

Proposal

Some configuration to the following could be set:

    latest_version: 
      type: dockerhub
      repository: releaseargus/argus  # repository name
      access_token:  # Dockerhub token for private repositories 
      url_commands:
        - type: regex_submatch  # This searches the image tag
          regex: ^v?([0-9.]+)$

I know there is a latest_version.required.docker feature but I guess it still needs releases are generated in the github repository.

@treezio treezio added the enhancement New feature or request label Feb 1, 2023
@JosephKav
Copy link
Collaborator

Hmm, currently you could query the tags page as url. I could add a github_tags type that'd query https://api.github.com/repos/confluentinc/kafka-images/tags (we look at /releases as this gives you assets uploaded for that release tag). I'll look into that aswell as this dockerhub approach soon. Thanks for the feature suggestion :)

  confluentinc/kafka-images:
    latest_version:
      type: url
      url: https://github.com/confluentinc/kafka-images/tags
      url_commands:
        - type: regex
          regex: \/releases\/tag\/v?([^"]+)\"

@larsl-net
Copy link
Contributor

larsl-net commented Aug 10, 2024

You can get a list of the tags over the Registry API, and with this base it should be possible to get the latest tag. I'm not sure if json filtering works here because of the array or you need to use regex.
Ex.

https://hub.docker.com/v2/namespaces/confluentinc/repositories/confluent-operator/tags

Maybe it is an option to support oci artifacts as type instead/additional to docker hub/image registries then it is not only limited to Container images.
This would add support for Helm charts and other custom artifacts (ex. authentik Blueprints).

Api request ex.
https://quay.io/v2/prometheus/prometheus/tags/list

Spec:
https://github.com/opencontainers/distribution-spec/blob/main/spec.md#content-discovery

For hub.docker.com ist seams that you need always a token. This is described in this issue with an example how to get this token.
distribution/distribution#1676

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants