I\'m trying to push a docker image to an Amazon ECR registry. I\'m using docker client Docker version 1.9.1, build a34a1d5. I use aws ecr get-login --regi
cat ~/.docker/config.json
Sample Result:
{
"auths": {
"https://55511155511.dkr.ecr.us-east-1.amazonaws.com": {}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/19.03.5 (darwin)"
},
"credsStore": "osxkeychain"
}
Notice that the "auths" value is an empty object and docker is using a credential store "osxkeychain".
Notice the Where: field
auths key in ~/.docker/config.json matches the Where: field in Keychain Access.If the auths key in ~/.docker/config.json does NOT match they Where: field in the keychain, you may get a Login Succeeded from docker login... but still get
ERROR: Service 'web' failed to build: Get https://55511155511.dkr.ecr.us-east-1.amazonaws.com/v2/path/to/image/latest: no basic auth credentials when you try to pull.
In my case, I needed to add https://
Original
"auths": {
"55511155511.dkr.ecr.us-east-1.amazonaws.com": {}
},
Fixed
"auths": {
"https://55511155511.dkr.ecr.us-east-1.amazonaws.com": {}
},