Plugin/ecr VS docker build - pulling images differntly

Platform: Kubernetes
I have kubernetes pipeline whith plugin/ecr, the FROM is aws ecr which able to fetch the images
when using dind service + docker build command it fails to pull image from ECR where on plugin/ecr its successfully do it automatically, what should I do?


solved by add aws ecr get-login to registry before build.