Jenkins's a bug

Deployed on redhat docker in jenkins run for a long time, found a new site not up to date, then went to view the discovery git repository Rom, I replaced the external network github repository you can even have to do is https ??? ?

Tip is the domain name resolution fails, I direct the implementation of the code is the problem git pull command no problem, indicating that DNS is no problem, at least on a host is no problem, and that the rest of the docker container on the host

Sure enough, to find a solution of the 2 solutions on stackoverflow

  1. Passing dns settings with --dns="8.8.8.8" to the container while using docker run
  2. Configure the DNS of the docker daemon itself this file /etc/docker/daemon.json by adding the following:
{
    "dns": ["8.8.8.8"]
}

reference:

https://stackoverflow.com/questions/55165878/jenkins-job-execution-could-not-resolve-host-github-com

Guess you like

Origin www.cnblogs.com/dbycl/p/11287973.html