How to use docker in docker in gitlab runners on EKS Kubernetes

According to docs

we can use docker.sock bu t EKS has deprectaed the docker and is using contained as runtime.

How can I use that to push docker images to ECR from runner job running inside EKS

The suggested approach is to use something else instead of Docker, there are options designed to run within k8s without the need for Docker daemon. There are options like kaniko or buildkit and others.

But if you insist on using Docker, here are the docs