mirror of https://github.com/cirruslabs/tart.git
Support Docker's `credsStore` (#591)
This way for #581 we don't need to specify a fully quialified URL and can simply use the following `~/.docker/config.json`: ```json { "credsStore": "ecr-login" } ``` Related to https://github.com/docker/cli/issues/2928
This commit is contained in:
parent
f68297097e
commit
f45551cbf0
|
|
@ -15,6 +15,10 @@ class DockerConfigCredentialsProvider: CredentialsProvider {
|
|||
return try executeHelper(binaryName: "docker-credential-\(helperProgram)", host: host)
|
||||
}
|
||||
|
||||
if let defaultCredsStore = config.credsStore {
|
||||
return try executeHelper(binaryName: "docker-credential-\(defaultCredsStore)", host: host)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -59,6 +63,7 @@ class DockerConfigCredentialsProvider: CredentialsProvider {
|
|||
struct DockerConfig: Codable {
|
||||
var auths: Dictionary<String, DockerAuthConfig>? = Dictionary()
|
||||
var credHelpers: Dictionary<String, String>? = Dictionary()
|
||||
var credsStore: String? = nil
|
||||
}
|
||||
|
||||
struct DockerAuthConfig: Codable {
|
||||
|
|
|
|||
Loading…
Reference in New Issue