当前位置:网站首页>Jenkins is deployed automatically and cannot connect to the dependent service [solved]

Jenkins is deployed automatically and cannot connect to the dependent service [solved]

2022-06-24 08:45:00 Falling the bowie

Preface :Docker Network problems

        If you used Docker Compose Start all dependent services , A network will be created by default , All the dependent services will be in this network , Services in different networks cannot access each other . The network I created here is deploy_default, So you need to specify sh The network on which the service runs in the script , Otherwise, the launched application service will not be able to connect to the dependent service .

  • Use docker inspect mysql Order to see mysql The network where the service is located ;

  •   adopt docker network ls To see all the networks ;

  • Modify all sh Script , Modify the network where the service is running , Add a row  --network deploy_default \ that will do .

Be careful not to add near the command line "#" Note at the beginning of the sign , There will be no --network Wrong command .

 

原网站

版权声明
本文为[Falling the bowie]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240618410682.html