AWS EC2 AMAZON LINUX not implemented
devcaco opened this issue · comments
devcaco commented
Hello, I'm running an EC2 with amazon linux and I followed the setup guide but when I try to docker login I get the following error:
Error saving credentials: error storing credentials - err: exit status 1, out: not implemented
Any help would be greatly appreciated.
Thanks
Sergio commented
Hi. The problem is in /home/<username>/.docker/config.json
file. I suppose you set a credstore to ecr in it.
IDK where I found the solution, but you have to do the following:
- (Only if you already have set ecr as a credstore in your .docker/config file).
cat /dev/null > ~/.docker/config.json
- Login to ECR
aws ecr get-login-password --region <aws-region> | docker login --username AWS --password-stdin <account-id>.dkr.ecr.eu-central-1.amazonaws.com
- Replace credential store in ~/.docker/config file:
cat /dev/null > ~/.docker/config.json && cat << EOF > ~/.docker/config.json { "credsStore": "ecr-login" } EOF
- Pull one of the containers from your ECR repo
docker pull <account-id>.dkr.ecr.eu-central-1.amazonaws.com:<image>
- Enjoy
Hannes Schmidt commented