I have a VM with Linux CentOS 7, and inside this VM, there is an active Docker daemon, running a container of a Jenkins instance (LTS). This instance is responsible of running a pipeline described in a Jenkinsfile, in which the last stage is the docker build of a Dockerfile. I attach to this post a photo of my current architecture to be as clear as possible.
My task is: successfully execute all the pipeline's stage, in particular the last one, the build of the Dockerfile.
But, I ran into a problem: inside the container I can't launch the docker daemon, so, how can I launch the build of the Dockerfile within its docker container?
A colleague suggested me to configure a Jenkins Agent on the VM, outside of the docker daemon, but is it possible? If yes, how?
Or maybe it's better to opt for other solutions?