I'm trying to set up Jenkins CI pipeline which will be used to build docker images. I have my auth key stored in Jenkins credentials and I want it to be loaded on start in placed in some environment variable (already done).
Is it possible that Docker will read that environment variable and use the key for authenticating to my container registry? Or maybe I can pass it somehow via command line?
I've tried searching for that in the docs, but only thing I found is that I can specify that values in
config.json and specify the location of that. This is not the best option IMO.
Any ideas? Thanks in advance.