Making service connect and stay up through docker network

A docker container is just an isolated process (sometimes incl. child processes) . no process == no container. A container is not a vm.

What tekki tried to point out is that people usualy use multi-stage builds to perform build task in the first stage and copy the artifacts from the first stage to the next stage. Though, this seem not to be what you want. But then again, even though you wrote a lot… the big picture is still unclear…