ECR credential helper not working with docker-autoscaler
Hi,
I am working on a proof of concept switching from docker+machine to docker-autoscaler.
Jobs are not able to run due to ECR pull errors
ERROR: Job failed: failed to pull image "123456789.dkr.ecr.ap-southeast-1.amazonaws.com/example:maven" with specified policies [always]: Error response from daemon: Head "https://123456789.dkr.ecr.ap-southeast-1.amazonaws.com/v2/example/manifests/maven": no basic auth credentials (manager.go:251:0s)
If I login to both the coordinator and worker nodes, I'm able to run a docker pull of this image from the command line without issue. I have set the ~/.docker/config.json for both instance types to
{ "credHelpers": { "123456789.dkr.ecr.ap-southeast-1.amazonaws.com": "ecr-login" }, "credsStore": "ecr-login" }
For both the root and ubuntu user.
I found the following issue, but the resolution is unclear and seems to be in-line with what I have already tried. #31062 (closed)
I have searched the documentation to find a solution for this but have been unable to.
If you could provide any guidance as to how we can pull from ECR with the docker-autoscaler executor that would be appreciated.