Skip to content

Commit

Permalink
update .dockercfg content to config.json
Browse files Browse the repository at this point in the history
update the data format of .dockercfg to match the new docker config.json
format, which encapsulates all registry auth objects in an overall
"auths" object:

{
    "auths": {
        "reg.url": {
            "auth": "...=="
        }
    }
}
  • Loading branch information
juanvallejo committed Oct 20, 2017
1 parent e0138d0 commit d4a3583
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/oc/cli/secrets/dockercfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ func (o CreateDockerConfigOptions) NewDockerSecret() (*api.Secret, error) {
Email: o.EmailAddress,
}

dockerCfg := map[string]credentialprovider.DockerConfigEntry{o.RegistryLocation: dockercfgAuth}
dockerCfg := credentialprovider.DockerConfigJson{
Auths: map[string]credentialprovider.DockerConfigEntry{o.RegistryLocation: dockercfgAuth},
}

dockercfgContent, err := json.Marshal(dockerCfg)
if err != nil {
Expand Down

0 comments on commit d4a3583

Please sign in to comment.