Getting CannotPullContainerError on ECS Fargate

Viewed 1167

I am trying to run my microservice on ECS Fargate. I have self hosted private Docker registry. I have tried pulling the same Docker image from inside the EC2 server in the same subnet as ECS Fargate service, it's able to pull the Docker image.

But, with ECS Fargate, I am getting the following error:

CannotPullContainerError: inspect image has been retried 5 time(s): failed to resolve ref "xxxxxxxxxxxxxx/xxxxxxxxxx:latest": failed to do request: Head https://xxxxxxxxxxxxxx/v2/xxxxxxxxxxxxxx/mani..

If it's the networking error, then it should not be accessible from the EC2 server in the same subnet as well. Looks like some issue with Fargate itself.

3 Answers

You want to push your image in aws ecr because aws ecs fargate will pull the image from aws ecr.

Copy the Image URI from Repository->Your_Image and paste it while creating a Task Definition.

What about Security Group Outbound rules for your Fargate task? have u routed the traffic to particular ALB? Http and Https msut be open for the task to make request to ECR!

Related