Working With AWS ECR on Kubernetes Running on Docker for mac

How to pull easily with a bash script images from Amazon ECR (Elastic Container Registry) docker images and run them on local Kubernetes