DNS가 컨테이너에서 느려지는 이유가 확실하지 않지만 고정 표시기 컨테이너에서 DNS를 해결하기위한 절차가 있습니다. 그것은 다시 사용하는 DNS IP가 위의 단계에서 발견
# nm-tool |grep DNS
DNS: 172.24.100.50
DNS: 10.1.100.50
실행 :
# docker run busybox nslookup google.com
Server: 8.8.8.8
Address 1: 8.8.8.8
nslookup: can't resolve 'google.com'
이 컴퓨터에서 사용하는 DNS 서버를 찾기 :
는 DNS 확인 문제를 확인하려면 DNS 문제를 해결합니다.
# docker run --dns 172.24.100.50 busybox nslookup google.com
Server: 172.24.100.50
Address 1: 172.24.100.50 indc01.radisys.com
Name: google.com
Address 1: 2607:f8b0:4009:80c::200e ord36s01-in-x0e.1e100.net
Address 2: 172.217.4.110 ord36s04-in-f14.1e100.net
은 영구적으로 새 파일에 다음과 같이 다음과 같은 내용을 추가 해결하려면 Docker DNS configuration에
[email protected]:/home/labadmin# cat /etc/docker/daemon.json
{
"dns" : ["172.24.100.50", "8.8.8.8"]
}
더 많은 정보를.
다시 시작 고정 표시기 서비스를 다시 확인합니다
# docker run busybox nslookup google.com
Server: 172.24.100.50
Address 1: 172.24.100.50 indc01.radisys.com
Name: google.com
Address 1: 2607:f8b0:4009:801::200e ord30s31-in-x0e.1e100.net
Address 2: 172.217.4.238 ord30s31-in-f14.1e100.net
이 컨테이너를 실행하여 확인이 도움이
# docker run -it e02e811dd08f
/# ping google.com
PING google.com (172.217.4.238): 56 data bytes
64 bytes from 172.217.4.238: seq=0 ttl=47 time=251.506 ms
64 bytes from 172.217.4.238: seq=1 ttl=47 time=245.621 ms
희망.
같은 문제가 발생 했습니까? – Chen
불행히도, 아니. – dastan
사용중인 이미지 버전은 무엇입니까? 나를위한 알파인, 아직 해결할 수있는 버그가있는 https://github.com/gliderlabs/docker-alpine/issues/8을 참조하십시오. – Chen