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!

Docker Registry API - User Agent String Required?



  • I am glad to see in 4.7.9 the catalog endpoint is allowed - however i believe there is a unnecessary restriction in the DockerAbsoluteUrlHandler class in the ProGet.WebApplication.dll - it appears the code requires that the User-Agent starts with "docker" (GetHttpHandler - method)

    This is limiting - for example Octopus does not send this User-Agent when calling docker registry endpoints. I would recommend removing that restriction.

    Product: ProGet
    Version: 4.7.9



  • It's actually the only way to tell whether a request is intended for the Docker API.

    We could make an exception for the catalog endpoint specifically, as nothing else should be using that URL. Would that be sufficient, or would it just cause problems if/when Octopus tries to access some other API endpoint for a Docker feed?



  • Dean - that feels like a poor solution for calling an api - i feel like it should function regardless of user agent. I would image that octopus calls other docker registry api commands.



  • I agree that it is a poor solution, but we do not have very many good solutions for this. Docker itself does not support prefixing private repositories; everything is assumed to be hosted in the same manner as the public registry (ie, absolute URL path from the server root), and assuming all /v2/ requests are Docker without some other declaration of intent in the request didn't seem good either.

    That said, if there's no collisions with anything else using that URL, we can change the default behavior.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation