Is it okay to run a docker container inside another docker container? Please explain if there are any cons.
Upto what depth is it advisable to go. I need to do this primarily for security concerns.
Docker in docker has use cases but from a security perspective it's a bad idea since it requires that the docker container is run in privileged mode.
This allows the docker container to do almost everything the host can do.
For example modifying kernel parameters of the underlying host and accessing information from within other docker containers.