8

I'm trying to setup the amazon-ecr-credential-helper but always get no basic auth credentials when I try to docker pull.

When I use aws ecr get-login and docker login ... then I have no problems.

I followed the instructions in their README file using the docker image to create the binary.

In the troubleshooting section they say that a log file should be stored in ~/.ecr/log but the /.ecr folder doesn't exist.

Specs: Docker version 18.06.1-ce, build e68fc7a

aws-cli/1.16.31 Python/2.7.15 Darwin/17.4.0 botocore/1.12.21

MacOS High Sierra

I hope somebody has an idea to figure out what's going wrong.

Peter Lustig
  • 1,585
  • 1
  • 18
  • 34
  • 1
    It sounds like the Docker CLI is not invoking the credential helper. Have you ensured that the `docker-credential-ecr-login` binary is present in your `PATH` and is marked as executable? – Samuel Karp Dec 10 '19 at 21:06

1 Answers1

1

I solved this problem by ensuring, the file ~/.docker/config.json was of the following content:

{
    "credsStore": "ecr-login"
}

This did not work for me:

{
    "credHelpers": {
        "aws_account_id.dkr.ecr.region.amazonaws.com": "ecr-login"
    }
}
Jonas_Hess
  • 1,874
  • 1
  • 22
  • 32