Start docker services in parallel


Because of, the docker services are created one by one (

We could find better and faster way to start the services in parallel but still get error from docker.
The only thing that cannot be done in parallel is the creation of the services. The creation and start of the contains (that take most of the time), can be do in parallel.
So, we need to find a way to only create the services one by one, and the rest in parallel.

Here is my ideas to investigate:

  • Move / separate the logic from service package to container package. If container can handle the start of multiple services, then we can create the service one by one, but wait for the containers starting status in parallel
  • See if an “create service” event is emitted by docker

From @ilgooz
1- I think moving that logic to container pkg makes sense because it’s about Docker Swarm, so it should be in container pkg. But it’s not 100% relevant with this issue.
2- We definitely need events for this one to create services atomically.