/usr/bin/docker-current: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
But the Kaniko tool should not need a docker daemon so I am kind of confused. Can someone help me to understand what I am missing?
In order to build a docker image without the docker daemon entirely (or another container solution), you'd need to use the kaniko executable. Which will be complex.
In reality Kaniko is not for escaping the docker daemon entirely, but for not using the same daemon to build and run images. This solves the problem that Kubernetes has when attempting to run a ci pipeline.
Although it does say a number of times that it's running inside a container. There are ways of running containers without docker so I'm sure that technically you could avoid it.
I think your misunderstanding must arise from a pretty bizarre use case. The only time I wouldn't want to use docker is inside docker. That's the problem that Kaniko solves.