#Howdy! I'd like to be able to push
1 messages ยท Page 1 of 1 (latest)
Hi ๐ We're on the Zenith community call in #911305510882513037 in case you're free now ๐
If you are authenticated locally, i.e. docker login, that gets passed into the modules. I have a few modules that publish images to my private registry but from a module standpoint I am not passing in anything. It's automatically pulled in by the dagger engine.
Guessing you could also use WithRegistryAuth approach and ask for token as a dagger.Secret in each function invocation or during a setup/init function where you store the token on the module's struct. Have to play with this. afk at the moment. @visual scarab any ideas?
nice to know this works with zenith/modules too!
Prob depends on whether you need to handle various registry creds during one Dagger session too
I actually do, and I just log into all of them locally. It has worked so far ๐ Sadly, can't say the same about other stuff like system proxies and ca-certificates but the dagger team is aware and working towards figuring solutions.
@rotund merlin as you can see the DX is still work in progress on this.. I would love to figure out the ideal DX for your module, and see if perhaps that can influence our design.
@rotund merlin what does your function signature look like so far?
Hey there, just getting back to this now. @pastel orbit thanks for the invite for the zenith community call. I'd love to join the next one !
@restive hamlet I'll push up my draft later this afternoon, but the module wraps building images with the depot CLI using a remote buildkit. The remote buildkit needs credentials to push to a registry. depot reads the credentials from the .docker directory.
I can totally change depot but the core problem is getting credentials into my module. @pastel orbit I'll try out your idea to ask the module user to pass credentials via a function call.
๐๐ผ @idle moon, this is not the case anymore correct? I am building a module and I need authentication against a OCI registry for which the host has access to
my understanding is that no environmental information is ever passed to a Dagger module unless explicitly passed as function arguments
is that the case also for docker creds? Do you have any example/best practice on how to do this common use-case in zenith?