aws-autoscaling-gitlab-runner icon indicating copy to clipboard operation
aws-autoscaling-gitlab-runner copied to clipboard

Possible to pull from private aws ecr-registry

Open darrencrossley opened this issue 5 years ago • 0 comments

Hi, I'm trying to pull from our private ECR registry but having trouble authenticating, I believe this should be possible based on this post:

https://gitlab.com/gitlab-org/gitlab-runner/issues/1583#note_93170156

By adding the aws credential-helper (https://github.com/awslabs/amazon-ecr-credential-helper) to the main EC2 manager.

Currently, I've added this to the Userdata of the instance:

UserData:
        Fn::Base64: !Sub |
          #!/bin/bash -xe
          yum update -y aws-cfn-bootstrap
 >>>      yum install -y amazon-ecr-credential-helper

And an env var named DOCKER_AUTH_CONFIG to our gitlab project variables with the address of the registry:

{
  "credHelpers": {
    "123.dkr.ecr.eu-central-1.amazonaws.com": "ecr-login"
  }
}

But currently, I'm still getting a no basic credentials specified when trying to pull the image.

Is this a supported/out of scope feature or has anyone succeeded with this use case? (Sorry if a SO question would be a better place for this question but it seemed like this would be a common use case for this repo.

darrencrossley avatar Sep 24 '19 17:09 darrencrossley