/var/run/docker.sockis the default Unix socket. […] Docker daemon by default listens to docker.sock.To run docker inside docker, all you have to do it just run docker with the default Unix socket
docker.sockas a volume.
docker run -v /var/run/docker.sock:/var/run/docker.sock \ -ti dockerNow, from within the container, you should be able to execute docker commands for building and pushing images to the registry.
[…] the actual docker operations happen on the VM host running your base docker container rather than from within the container.
https://devopscube.com/run-docker-in-docker/
kaniko is an open-source container image-building tool created by Google. […] all the image-building operations happen inside the Kaniko container’s userspace.
https://devopscube.com/build-docker-image-kubernetes-pod/