No issue, just technical discussion on how you call docker client from job buildspec
As perfectly describe here, i'm using a service for a CI Database job to test and valid my database script creation and update.
Everything works but i'm wondering :
how do you avoid collision between this temporary services (with publish port) and existing container (port already publish) ?
what parameters are you passing to docker cli ?
I think you create a private network to avoid this port collision and in addition, allow network connection using container name ?
Thanks for your lights
Robin Shen commented 1 year ago
Yes a private network is defined for each run of the job, and service container is started with network alias specified as service name, which can be accessed as host name. The logic to start service container is as below:
Hi,
No issue, just technical discussion on how you call docker client from job buildspec
As perfectly describe here, i'm using a service for a CI Database job to test and valid my database script creation and update.
Everything works but i'm wondering :
I think you create a private network to avoid this port collision and in addition, allow network connection using container name ?
Thanks for your lights