Docker Community Forums

Share and learn in the Docker community.

One container spawns another container

I have a container (I will call it parent) that launches a cpu intensive java Process when a REST endpoint is triggered. I have been asked to use docker-java in the parent container to launch the Process in a new container.

Is this the right way to approach this problem?

I have read several blogs that suggest spawning a container from within another container is bad design, opens security issues and generally frowned upon. I am unable to find a conclusive answer to how this kind of problem should solved with docker.

Any thoughts are much appreciated.