mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-13 11:01:49 +00:00
Support Docker credential helpers (#1075)
* support docker credential and add docker-credential-ecr-login into alpine image * Remove ecr from docker and add docs * Update docs/docs/30-administration/22-backends/10-docker.md Co-authored-by: WeStone <xuecanlong@qq.com> Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
@@ -40,6 +40,13 @@ func parseDockerConfig(path string) ([]*model.Registry, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for registryHostname := range configFile.CredentialHelpers {
|
||||
newAuth, err := configFile.GetAuthConfig(registryHostname)
|
||||
if err == nil {
|
||||
configFile.AuthConfigs[registryHostname] = newAuth
|
||||
}
|
||||
}
|
||||
|
||||
for addr, ac := range configFile.AuthConfigs {
|
||||
if ac.Auth != "" {
|
||||
ac.Username, ac.Password, err = decodeAuth(ac.Auth)
|
||||
|
||||
Reference in New Issue
Block a user