1

We are using Jenkins and docker for doing CI/CD. Our Jenkins is setup as master/slave style, where slaves are distributed across different data centers. when a new build needs to happen Jenkins master identifies a slave in one of the DC and spin up a ephemeral container and tear it down once done.

Due to firewall limitations, we only have about 10 ports open for the slaves in some of the DCs. for example Port Range: 8000 - 8010. In general docker uses the linux port ranges 32768 to 61000. The problem is Jenkins master can not talk to the containers if the host port is bound out of 8000 - 8010. Jenkins docker plugin has limitation where you can not bind multiple ports (may be I am wrong here). I would like to know if any way we can configure this at docker end or in Jenkins docker plugin.

4

1 回答 1

0

在许多论坛研究并与人交谈之后,这是不可能的,甚至不建议尝试这样做。克服这个问题的推荐实现是迁移到 Docker Swarm,

  1. 您只有一个虚拟 docker 云
  2. 它负责在幕后启动容器,甚至在需要之前就准备好使用它。配置选项很灵活。

在此处阅读有关 Swarm 的更多信息 https://docs.docker.com/swarm/

于 2016-11-28T16:27:33.333 回答