Installing amazon-ecr-credential-helper on Ubuntu 18.04
For a customer project of mine, I needed to install Amazon ECR Docker Credential helper. Sadly, as referenced in this issue: https://github.com/awslabs/amazon-ecr-credential-helper/issues/188 amazon-ecr-credential-helper Ubuntu LTS (e.g. 18.04) is not available via apt.
The only way out of this is to install it via source. The steps are as follows, run:
git clone git@github.com:awslabs/amazon-ecr-credential-helper.git
`cd` into the repository and run:
make docker
Wait a few minutes for this to finish, as it will now build the binary that we need.
Then, within your local repository, in ./bin/local there should be a binary called “docker-credential-ecr-login”. chmod +x that binary so it’s executable and move it to /usr/local/bin/ so that it’s available on your $PATH.
Make sure that your ~/.docker/config.json contains the following:
{
"credsStore": "ecr-login"
}
Then everything should be good to go!