Expected behavior
After starting a docker container on Windows 2016, expected network connectivity from inside the Docker container.
Actual behavior
No network connectivity from within the Docker container. eg. “ping google.com” and “ping 8.8.8.8” timed out.
Information
OS: Windows Server 2016 Standard
> docker version
Client:
Version: 17.03.1-ee-3
API version: 1.27
Go version: go1.7.5
Git commit: 3fcee33
Built: Thu Mar 30 19:31:22 2017
OS/Arch: windows/amd64
Server:
Version: 17.03.1-ee-3
API version: 1.27 (minimum version 1.24)
Go version: go1.7.5
Git commit: 3fcee33
Built: Thu Mar 30 19:31:22 2017
OS/Arch: windows/amd64
Experimental: false
> docker info
Containers: 2
Running: 1
Paused: 0
Stopped: 1
Images: 15
Server Version: 17.03.1-ee-3
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.693.amd64fre.rs1_release.161220-1747)
Operating System: Windows Server 2016 Standard
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 31.96 GiB
Name: dm-bm-win2016-1
ID: YJZ5:RFM3:UEGI:B2YG:VSAJ:YVLE:ULVI:YVQO:HCXV:ZVH6:W353:7KJW
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
> docker network ls
NETWORK ID NAME DRIVER SCOPE
a24abce6fc4d nat nat local
2a89a18476aa none null local
When I do a “docker inspect” of the running container I get this (I’ve hidden some values just to be safe)
docker inspect <container_id>
…..
"NetworkSettings": {
"Bridge": "",
"SandboxID": "7eb95515b541f14080b7f95f802c46e94cb93edd812d124145375070d83d5631",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "<HIDDEN>",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"nat": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "<HIDDEN>",
"EndpointID": "<HIDDEN>",
"Gateway": "172.17.48.1",
"IPAddress": "172.17.48.24",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "<HIDDEN>"
}
}
Steps to reproduce the behavior
On Windows 2016, install Windows Docker.
- Install-Module -Name DockerMsftProvider -Force
- Install-Package -Name docker -ProviderName DockerMsftProvider -Force
- Restart-Computer -Force
Pull Windows Server core
- docker pull microsoft/windowsservercore
Start Windows Docker container
- docker run -it microsoft/windowsservercore powershell
OR - docker run -it --network=nat microsoft/windowsservercore powershell
Inside the container:
- ping google.com — TIME OUT
- ping 8.8.8.8 ---- TIME OUT