Useful link to build the app with jenkins in docker, create and run the image. So this is an example of create and run docker image inside a docker image :)
https://getintodevops.com/blog/building-your-first-docker-image-with-jenkins-2-guide-for-developers
And don't forget to allow the jenkins user to use docker with :
usermod -aG docker jenkins