Best practices for adding a Registry middleware #4732
Unanswered
lorenzo-milicia
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Good afternoon,
I am interested in creating a Registry middleware for distribution, as I saw that there is support for them mentioned in the configuration.
Due to a complete lack of documentation, examples and issues on the topic, I dove deep into the code, to try and understand how these are meant to be used.
From my understanding, it seems that these middlewares requires rebuilding the binaries, with the additional registration of a middleware via the middleware.Register func.
This can be achieved either via a fork of the repo, or writing a simple Golang application that calls registry.RootCmd.Execute() as the main.go of distribution does (with proper imports for side effects).
This seems to work from a first test, but I don't feel 100% confident that I am not missing some key parts of how the official binaries/images are released, and it makes the overall result more fragile.
Am I missing something? Is there a more straight forward way of writing and running the custom middlewares that the configuration API allows?
Thank you in advance for the help!
Beta Was this translation helpful? Give feedback.
All reactions