aws-codebuild-docker-images
aws-codebuild-docker-images copied to clipboard
Should images ship with `docker-credential-ecr-login` pre-installed and configured?
https://github.com/awslabs/amazon-ecr-credential-helper
It seems like a massive improvement over the classic:
aws ecr get-login-password --region=foo | \
docker login --username AWS --password-stdin repository-uri
It looks like the package is already included but needs to be configured.
Hm, that's interesting because I don't see it on the aws/codebuild/standard:7.0 image:
#2 ERROR: error getting credentials - err: exec: "docker-credential-ecr-login": executable file not found in $PATH, out: ``
docker-credential-ecr-login has been pre-installed in latest version of ubuntu:7.0 image. You can configure it by adding the following commands in your buildspec:
phases:
install:
commands:
- mkdir -p ~/.docker
- "echo '{\"credsStore\": \"ecr-login\"}' > ~/.docker/config.json"
It is not pre-configured in image because configuring it would cause docker login commands to fail.