-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private Docker Repo auth when using Fargate launch type #540
Comments
Apart from exposing the underlying ecr repository that is backing d.ims.io and recommending using the ecr-credential-helper on their dev and ci pipeline images, I can't think of what else can be done to ease the transition from d.ims.io to ecr repo. Potential Workflow:
As far as an actionable tasks as a result of this issue:
|
Alternative solution: ECR backed docker repositoryAnother potential solution could be a modification to L0 setup & our private-repo.ims.io which would allow the user to specify a docker image prefix mapping. l0 setup:
Using this configuration value, when a user tries to create a deploy using an image like This would allow a fargate launch type service/task to pull down the image and still keep the image private and have manageable names without the overly verbose ECR domain prefix. An additional benefit one could argue would be that private-repository.io going down would never prevent an image being pulled down from ECS. private-repository.ims.io repository policies: This would require a change to private-repository.io as well to create a policy like below for each new repository that is created via private-repository.ims.io and a way to update policies for all repositories every time we want to give/revoke access from a new aws account. {
"Version": "2008-10-17",
"Statement": [
{
"Sid": "GrantCrossAccount",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::<otherAccountId>:*"
},
"Action": [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:BatchCheckLayerAvailability"
]
}
]
} This solution on the surface might seem complicate given the simplicity of the user experience of private-repository.ims.io. But given the limitation of private docker repo auth with fargate, this change would introduce an extra step when creating a new instance, but would otherwise allow the fargate tasks to work with our private docker images in way that is transparent to the user. https://docs.aws.amazon.com/AmazonECR/latest/userguide/set-repository-policy.html |
When using Fargate launch type, we aren't able to customize the underlying ec2 instances that the containers are run on. So our previous method adding docker auth via a Launch Configuration will no be possible.
Instead we will have to rely on ECR and credential helper already being on the instances that will pull the containers.
See discussion below:
#525 (comment)
The text was updated successfully, but these errors were encountered: