This blog , which I wrote, has plenty of info on the problems with running Jenkins pipelines with Docker.
The approach of using a container with Jenkins + Docker-client and mounting /var/run/docker.sock so that the client can connect with Docker on the host is fine in some cases, but will give you a lot of headaches if your Jenkins job must build or run Docker containers (which is a common pattern).
The problems stem from the fact that the entity creating the containers (Jenkins) is running in a different context than the Docker daemon (the former runs in a container, the latter on the host).
I recently founded a company called Nestybox that has created a container runtime (aka runc) that enables Docker to deploy containers that act like virtual hosts and can run system-level software such as Docker in them, without using privileged containers.
The blog I referenced above has a clean & simple solution for running Jenkins + Docker that may save you a good amount of time. It has already helped others. Check it out, hopefully it will help!