#Howdy! I'd like to be able to push

1 messages ยท Page 1 of 1 (latest)

pastel orbit
#

Hi ๐Ÿ‘‹ We're on the Zenith community call in #911305510882513037 in case you're free now ๐Ÿ™‚

idle moon
#

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.

pastel orbit
#

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?

pastel orbit
#

Prob depends on whether you need to handle various registry creds during one Dagger session too

idle moon
restive hamlet
#

@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?

rotund merlin
#

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.

vague moon
#

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?