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
- Passing dns settings with
--dns="8.8.8.8"
to the container while usingdocker run
- 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