Docker container cannot resolve dns

I am trying to set up my docker container to see my local private rpm repository over http. It cannot resolve the dns name and I probably configured the DNS incorrectly on the CENTOS 6.5 VM host.

Http: // 172.17.42.1

/repository/CENTOS/6/nginx/x86_64/repodata/repomd.xml:

[Errno 14] PYCURL ERROR 7 → "failed to connect to host"

bash -4.1 # more / etc / yum.repos.d / nginx.repo

[Nginx] name = nginx repo

     
  

BaseUrl = HTTP: // 172.17.42.1/repository/CENTOS/$releasever/nginx/$basearch/

  

(unable to connect to host)

gpgcheck = 0 enabled = 1

The /etc/resolv.conf container contains this

bash -4.1 # cat / etc / resolv.conf nameserver 192.168.64.2 nameserver 192.168.64.129 nameserver 127.0.0.1 search localdomain eadis.local

When I try to add a domain name to an IP address it doesn't solve it.

Docker container ip

eth0 Link encap: Ethernet HWaddr 7E: EB: 4C: 25: F4: DA
           inet addr: 172.17.0.7 Bcast: 0.0.0.0 Mask: 255.255.0.0

Docker Host VM Server

docker0 Link encap: Ethernet HWaddr FE: EF: 63: A8: 65: 5C

     

inet addr: 172.17.42.1

Bcast: 0.0.0.0 Mask: 255.255.0.0

eth3 Link encap: Ethernet HWaddr 00: 0C: 29: 10: 0A: 77
           inet addr: 192.168.64.129 Bcast: 192.168.64.255 Mask: 255.255.255.0

     

[root @centos named] # cat / etc / resolv.conf

     
  
    

domain local domain search localdomain eadis.local nameserver 192.168.64.129 nameserver 192.168.64.2

    
+3


source to share





All Articles