moby: Windows docker doesn't honor --dns-search option
BUG REPORT INFORMATION
Description
--dns-search
option doesn’t take effect on Windows containers.
Steps to reproduce the issue:
docker run --rm -t --dns 8.8.8.8 --dns-search github.com --network [your-docker-network] microsoft/windowsservercore ifconfig /all
docker run --rm -t --dns 8.8.8.8 --dns-search github.com --network [your-docker-network] microsoft/windowsservercore ping help
Describe the results you received: Output for ipconfig within container:
Windows IP Configuration
Host Name . . . . . . . . . . . . : ac8fe16b0b10
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter vEthernet (Container NIC 02d5de47):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #4
Physical Address. . . . . . . . . : 00-15-5D-16-E5-6D
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::8955:4b31:8eaf:fe34%48(Preferred)
IPv4 Address. . . . . . . . . . . : 172.31.1.121(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.31.1.1
DNS Servers . . . . . . . . . . . : 8.8.8.8
NetBIOS over Tcpip. . . . . . . . : Disabled
Output for ping within container:
Ping request could not find host help. Please check the name and try again.
Describe the results you expected:
items specified in --dns-search
should be prsented in field “DNS Suffix Search List” of the ipconfig /all
output.
ping help
in the container should be the same as ping help.github.com
which is reachable.
Output of docker version
:
Client:
Version: 1.14.0-dev
API version: 1.26
Go version: go1.7.3
Git commit: f93c04d
Built: Sat Dec 17 15:16:54 2016
OS/Arch: windows/amd64
Server:
Version: 1.14.0-dev
API version: 1.26
Minimum API version: 1.24
Go version: go1.7.3
Git commit: f93c04d
Built: Sat Dec 17 15:16:54 2016
OS/Arch: windows/amd64
Experimental: false
Output of docker info
:
C:\Users\Administrator>docker info
Containers: 6
Running: 2
Paused: 0
Stopped: 4
Images: 22
Server Version: 1.14.0-dev
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.351.amd64fre.rs1_release_inmarket.161014-1755)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 3.999 GiB
Name: WIN2016-DOCKER-01
ID: MCVH:SYEM:X2IN:FRIH:CYGH:HGLB:PAKZ:XAME:2IE7:PNZF:XTTL:EDLM
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
192.168.180.200:5000
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.): It’s an always behavior happens to both VMware virtual machine and AWS EC2 host.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (7 by maintainers)
@thaJeztah this works on Windows version 1709 with the latest build.
Docker build
Docker network creation
Container run: