Maybe you should read up a bit about how docker works, you seem to misunderstand a lot here.
For example the “various images” are kind of the point of docker. Images are layered, and each layer is its own image, so you might end up with 3 or 4 images despite only building one image.
This is something you can’t really prevent. It’s just how docker works.
Anyway, you can mount the docker socket into a container, and using that socket you can then build an image within the running container. That’s essentially how most ci/cd systems work.
You could maybe look into podman and buildah, as far as I know, these can build images without a running docker daemon. That might be a tad “cleaner”, but comes with other problems (like no caching).