The proposed Ethan mechanism is correct for launching several docker containers at once, but does not explain why.
To explain a little further, each docker container can spawn several processes (servers), but for a docker container one of the processes is required, which should be in the foreground, and docker - the containerβs life cycle usually reflects the life cycle of the foreground process.
Many of the benefits of docking will be lost when running all processes in the same docker container. And therefore, it is recommended that you have one docker container per process.
source share