Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Order docker images tag list by created date

    Scheduled Pinned Locked Moved Support
    4 Posts 2 Posters 12 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      nuno.guerreiro.rosa_9280
      last edited by nuno.guerreiro.rosa_9280

      Hi,

      There is an API method called /tag/list which returns this unordered tag list.
      Are you able to add a query string parameter ?order=date to produce a result ordered at least by tag created date? I don't think it should be that challenging to do and I do see the benefits of getting the TAGs ordered according to the Date they were created..

      In my honest opinion, it should by default order by created date. I shouldn't even need to provide the query string. That way it would be even easier to implement.

      af16bcb0-bbd4-484e-896e-62492f6f060c-image.png

      1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer
        last edited by

        hello;

        I assume you're referring to the Docker feeds Docker API's implementation?

        https://docs.docker.com/registry/spec/api/#listing-image-tags

        The docs don't give a great clue, but it does say "ordered lexically", which it seems ProGet's API follows. We can't really add parameters, and changing behavior might break things that otherwise expect this order.

        But I do agree the order doesn't' make much sense; we just followed the API. If you can find evidence find how other implementers handle ordering differently (DockerHub, etc.), we can consider to change it.

        Cheers,
        Alana

        N 1 Reply Last reply Reply Quote 0
        • N Offline
          nuno.guerreiro.rosa_9280 @atripp
          last edited by nuno.guerreiro.rosa_9280

          @atripp The main goal for me is to be able to fetch the latest tag for a particular docker image so I can display in a custom badge.
          For NuGets I have the API shown below:

          Get Latest Version number of a package:
          https://«proget-server»/nuget/{feed-name}/Packages()?$filter=Id%20eq%20%27«package-name»%27%20and%20IsAbsoluteLatestVersion&$top=1

          For docker images I would like to query based on the tag list to get the last one created but I can't seem to find a good option to do with this API if there is no ordering capabilities. It should be a simple requirement to query a docker image and get the last created tag.

          atrippA 1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer @nuno.guerreiro.rosa_9280
            last edited by

            @nuno-guerreiro-rosa_9280 the API you referenced is the "NuGet v2 API", and we simply follow the specification when we implement their API.

            In the same way, we follow the Docker API specification, which does not provide a way to query a docker image in the way you'd like. I think you have a good point, but it's not our specification or decision, but Docker's

            There's not much of a demand for a ProGet-proprietary API for packages at this time, but if you can help us understand the value of this, then we can better considering it - https://inedo.com/open/feature-requests

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation