-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify the path to the docker config file #1618
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I successfully worked around the issue. Using jenkins docker.withRegistry will store the path in an environment variable. https://jenkins.io/doc/book/pipeline/docker/ Using kotlin dsl syntax:
|
@jontro for Jenkins, another way is to use
|
@chanseokoh Not sure how to use that with ecr since credentials are fetched using the aws api. This plugin https://wiki.jenkins.io/display/JENKINS/Amazon+ECR makes it easy to use with withRegistry |
When thinking a bit more about it the environment variable DOCKER_CONFIG is the standard way of changing the location. The plugin could take this into account automatically and fall back to $HOME/.docker |
It'd be useful to fix the original issue (feature request to specify a Docker config path on the command line). For example, Tekton currently creates a file at |
For now, I think it makes sense to just use the |
The environment variable makes sense.
When deciding this, one factor is that this config is highly platform-dependent. |
fixed by #2402 |
Thanks! can confirm this now works out of the box. Great work |
I'd like to specify the path to my Docker config file, by default it reads it from
${user.home}/.docker/config.json
.I can see from
CredentialRetrieverFactory#dockerConfig(java.nio.file.Path)
that it's possible, however the documentation does not specify how to do it.Thank you for your help.
The text was updated successfully, but these errors were encountered: