in docker_utils.py [0:0]
def _ecr_login_if_needed(image):
ecr_client = boto3.client('ecr')
# Only ECR images need login
if not ('dkr.ecr' in image and 'amazonaws.com' in image):
return
# do we have the image?
if _check_output('docker images -q %s' % image).strip():
return
aws_account = image.split('.')[0]
_ecr_login(ecr_client, aws_account)