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:
qwerty287
2022-08-14 10:46:18 +02:00
committed by GitHub
parent b7957c53aa
commit bed3ef104c
2 changed files with 19 additions and 0 deletions

View File

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