Dynamically provisioned slave images and dependent containers

33 views
Skip to first unread message

Nicklas Karlsson

unread,
May 24, 2018, 7:55:23 AM5/24/18
to Jenkins Users
Hi,

  I'm using a SSH-communicating, dynamically provisioned docker-plugin-cloud which uses the mounted docker.sock of the parent to spawn postgresql/wildfly containers in the pipeline as needed.
Is there any way of using dynamic names/ports so that multiple slaves don't cause container name collisions (all using the parent docker dock)? Of course, using docker-in-docker would give the
containers separate namespaces but apparently it has some downsides, too. Another approach could be to use scripting to determine a free container name/port from the docker.sock but that would
leave the complication of the appserver datasource being hardcoded to some postgresql container etc.

How have you solved this?

Thanks in advance,
  Nik

geoffroy...@gmail.com

unread,
May 24, 2018, 3:16:20 PM5/24/18
to Jenkins Users
You might need to move to a Container orchestration platform (Mesos, Kubernetes, Swarm) for that, this would address all our needs, although it is probably overkill!

Nicklas Karlsson

unread,
May 25, 2018, 1:32:57 AM5/25/18
to Jenkins Users
Thanks for the pointer but as you said, I think that will be overkill for a team of a few developers.

I think I'll write a small utility that uses the Docker API for getting some free ports and then modify the involved components with parameters etc so that they can find each other.
Reply all
Reply to author
Forward
0 new messages