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 13, 2017
1 parent 05f812f commit 37d9b28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/oc/cli/secrets/dockercfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ func (o CreateDockerConfigOptions) NewDockerSecret() (*api.Secret, error) {
Email: o.EmailAddress,
}

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

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

0 comments on commit 37d9b28

Please sign in to comment.