Run container with private image from ECR AWS

I am trying to run a container with a custom private image from AWS ECR, the problem is that i could not authenticate, this is my yml


this is the error
Error: Docker login for 'account.dkr.ecr.region.amazonaws.com' failed with exit code 1