{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/16913","labels_url":"https://api.github.com/repos/docker/docker/issues/16913/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/16913/comments","events_url":"https://api.github.com/repos/docker/docker/issues/16913/events","html_url":"https://github.com/docker/docker/issues/16913","id":110830821,"number":16913,"title":"IPV6 does not work during docker build command","user":{"login":"Firstyear","id":271005,"avatar_url":"https://avatars.githubusercontent.com/u/271005?v=3","gravatar_id":"","url":"https://api.github.com/users/Firstyear","html_url":"https://github.com/Firstyear","followers_url":"https://api.github.com/users/Firstyear/followers","following_url":"https://api.github.com/users/Firstyear/following{/other_user}","gists_url":"https://api.github.com/users/Firstyear/gists{/gist_id}","starred_url":"https://api.github.com/users/Firstyear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Firstyear/subscriptions","organizations_url":"https://api.github.com/users/Firstyear/orgs","repos_url":"https://api.github.com/users/Firstyear/repos","events_url":"https://api.github.com/users/Firstyear/events{/privacy}","received_events_url":"https://api.github.com/users/Firstyear/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-11T03:21:48Z","updated_at":"2015-12-19T23:52:53Z","closed_at":null,"body":"During a docker build communication over IPv6 via fe80::1%eth0 does not work to the host machine. The built container however functions correctly. We can see that correctly ipv6 link local addresses do exist in /proc/net/if_inet6.\r\n\r\n\r\nList the steps to reproduce the issue:\r\n1. From a fedora:latest with docker run -i -t /bin/bash:\r\n[root@c76f2b9d2d77]/# nmap 172.17.42.1 -p 3128\r\n\r\nStarting Nmap 6.47 ( http://nmap.org ) at 2015-10-11 03:11 UTC\r\nNmap scan report for 172.17.42.1\r\nHost is up (0.000065s latency).\r\nPORT     STATE SERVICE\r\n3128/tcp open  squid-http\r\nMAC Address: 02:42:FC:D5:D8:71 (Unknown)\r\n\r\nNmap done: 1 IP address (1 host up) scanned in 0.13 seconds\r\n[root@c76f2b9d2d77]/# nmap -6 fe80::1%eth0 -p 3128\r\n\r\nStarting Nmap 6.47 ( http://nmap.org ) at 2015-10-11 03:11 UTC\r\nNmap scan report for gateway (fe80::1)\r\nHost is up (0.00017s latency).\r\nPORT     STATE SERVICE\r\n3128/tcp open  squid-http\r\nMAC Address: 02:42:FC:D5:D8:71 (Unknown)\r\n\r\nNmap done: 1 IP address (1 host up) scanned in 0.15 seconds\r\n\r\n2:\r\nUsing the following Dockerfile:\r\n\r\nFROM fedora:latest\r\nRUN dnf install -y nmap\r\nRUN cat /proc/net/if_inet6\r\nRUN nmap 172.17.42.1 -p 3128\r\nRUN nmap -6 fe80::1%eth0 -p 3128\r\n\r\nWith docker build -t test .\r\n\r\nDescribe the results you received:\r\n\r\ndocker build -t testcontainer:latest .\r\nSending build context to Docker daemon 2.048 kB\r\nStep 0 : FROM fedora:latest\r\n ---> ded7cd95e059\r\nStep 1 : RUN dnf install -y nmap\r\n ---> Running in 18661977613d\r\nLast metadata expiration check performed 0:00:19 ago on Sun Oct 11 03:15:20 2015.\r\nDependencies resolved.\r\n================================================================================\r\n Package           Arch           Version                 Repository       Size\r\n================================================================================\r\nInstalling:\r\n libpcap           x86_64         14:1.7.3-1.fc22         updates         149 k\r\n nmap              x86_64         2:6.47-2.fc22           fedora          4.0 M\r\n nmap-ncat         x86_64         2:6.47-2.fc22           fedora          135 k\r\n\r\nTransaction Summary\r\n================================================================================\r\nInstall  3 Packages\r\n\r\nTotal download size: 4.3 M\r\nInstalled size: 17 M\r\nDownloading Packages:\r\n--------------------------------------------------------------------------------\r\nTotal                                           233 kB/s | 4.3 MB     00:18     \r\nRunning transaction check\r\nTransaction check succeeded.\r\nRunning transaction test\r\nTransaction test succeeded.\r\nRunning transaction\r\n  Installing  : libpcap-14:1.7.3-1.fc22.x86_64                              1/3 \r\nwarning: Unable to get systemd shutdown inhibition lock\r\n  Installing  : nmap-ncat-2:6.47-2.fc22.x86_64                              2/3 \r\n  Installing  : nmap-2:6.47-2.fc22.x86_64                                   3/3 \r\n  Verifying   : nmap-2:6.47-2.fc22.x86_64                                   1/3 \r\n  Verifying   : nmap-ncat-2:6.47-2.fc22.x86_64                              2/3 \r\n  Verifying   : libpcap-14:1.7.3-1.fc22.x86_64                              3/3 \r\n\r\nInstalled:\r\n  libpcap.x86_64 14:1.7.3-1.fc22            nmap.x86_64 2:6.47-2.fc22           \r\n  nmap-ncat.x86_64 2:6.47-2.fc22           \r\n\r\nComplete!\r\n ---> aa84cdbacaed\r\nRemoving intermediate container 18661977613d\r\nStep 2 : RUN cat /proc/net/if_inet6\r\n ---> Running in b6c8b1e812cb\r\n00000000000000000000000000000001 01 80 10 80       lo\r\nfe8000000000000000000242ac11000c bd 40 20 c0     eth0\r\nfe800000000000000042acfffe11000c bd 40 20 c0     eth0\r\n ---> c5483d1e5e0b\r\nRemoving intermediate container b6c8b1e812cb\r\nStep 3 : RUN nmap 172.17.42.1 -p 3128\r\n ---> Running in 89dab5398379\r\n\r\nStarting Nmap 6.47 ( http://nmap.org ) at 2015-10-11 03:16 UTC\r\nNmap scan report for 172.17.42.1\r\nHost is up (0.000053s latency).\r\nPORT     STATE SERVICE\r\n3128/tcp open  squid-http\r\nMAC Address: 02:42:FC:D5:D8:71 (Unknown)\r\n\r\nNmap done: 1 IP address (1 host up) scanned in 0.13 seconds\r\n ---> fc208785eba9\r\nRemoving intermediate container 89dab5398379\r\nStep 4 : RUN nmap -6 fe80::1%eth0 -p 3128\r\n ---> Running in f2c4bf3b8a1c\r\n\r\nStarting Nmap 6.47 ( http://nmap.org ) at 2015-10-11 03:16 UTC\r\nFailed to convert source address to presentation format!?!  Error: Address family not supported by protocol\r\nQUITTING!\r\nThe command '/bin/sh -c nmap -6 fe80::1%eth0 -p 3128' returned a non-zero code: 1\r\n\r\nDescribe the results you expected:\r\n\r\nIPv6 to work during docker build\r\n\r\nProvide additional info you think is important:\r\n\r\nThis is not an interpretation issue with the Dockerfile and the % or other chars, as I picked this up after using an ADD file command to add a local proxy via ipv6 to a container. The following command that relied on the proxy then failed due to ipv6 not working.\r\n\r\nIn my case I am checking port 3128, but this could easily be anything on the host machine.\r\n\r\ndocker version\r\nClient:\r\n Version:      1.8.2-fc22\r\n API version:  1.20\r\n Package Version: docker-1.8.2-1.gitf1db8f2.fc22.x86_64\r\n Go version:   go1.4.2\r\n Git commit:   f1db8f2/1.8.2\r\n Built:        \r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.8.2-fc22\r\n API version:  1.20\r\n Package Version: \r\n Go version:   go1.4.2\r\n Git commit:   f1db8f2/1.8.2\r\n Built:        \r\n OS/Arch:      linux/amd64\r\n\r\ndocker info   \r\nContainers: 5\r\nImages: 73\r\nStorage Driver: btrfs\r\nExecution Driver: native-0.2\r\nLogging Driver: json-file\r\nKernel Version: 4.3.0-0.rc4.git0.1.mbpv2.fc24.x86_64\r\nOperating System: Fedora 22 (Twenty Two)\r\nCPUs: 8\r\nTotal Memory: 15.46 GiB\r\nName: franky.ipa.example.com\r\nID: WGE2:VZWO:5DPK:4AV7:BVUB:2JGD:TVHN:S7HP:6AGD:CJ56:QMRJ:JSC4\r\nDebug mode (server): true\r\nFile Descriptors: 25\r\nGoroutines: 56\r\nSystem Time: 2015-10-11T13:15:56.901268426+10:00\r\nEventsListeners: 0\r\nInit SHA1: 603c4f89aedd044c26f9b65e8f6af985190a4da3\r\nInit Path: /usr/libexec/docker/dockerinit\r\nDocker Root Dir: /var/lib/docker\r\n\r\nLinux franky.ipa.example.com 4.3.0-0.rc4.git0.1.mbpv2.fc24.x86_64 #1 SMP Fri Oct 9 13:04:14 AEST 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/166034422","html_url":"https://github.com/docker/docker/issues/16913#issuecomment-166034422","issue_url":"https://api.github.com/repos/docker/docker/issues/16913","id":166034422,"user":{"login":"narqo","id":88045,"avatar_url":"https://avatars.githubusercontent.com/u/88045?v=3","gravatar_id":"","url":"https://api.github.com/users/narqo","html_url":"https://github.com/narqo","followers_url":"https://api.github.com/users/narqo/followers","following_url":"https://api.github.com/users/narqo/following{/other_user}","gists_url":"https://api.github.com/users/narqo/gists{/gist_id}","starred_url":"https://api.github.com/users/narqo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narqo/subscriptions","organizations_url":"https://api.github.com/users/narqo/orgs","repos_url":"https://api.github.com/users/narqo/repos","events_url":"https://api.github.com/users/narqo/events{/privacy}","received_events_url":"https://api.github.com/users/narqo/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T23:52:53Z","updated_at":"2015-12-19T23:52:53Z","body":"Hey @Firstyear, I currently have an issue with similar signs. It looks like docker had run the command you passed within the `Dockerfile`, before IPv6 network was established. \r\n\r\nCould you check this two scenarios based on your description from the issue:\r\n\r\n1\\. Run `nmap` right after container was started:\r\n~~~sh\r\n› docker run -i --rm fedora:latest nmap -6 fe80::1%eth0 -p 3128\r\n~~~ \r\n\r\n2\\. Wait a little before running `nmap`\r\n~~~sh\r\n› docker run -i --rm fedora:latest sh -c 'sleep3; nmap -6 fe80::1%eth0 -p 3128'\r\n~~~\r\n\r\nMy guess here is that everything will work as expected in the second case.\r\n\r\n/cc @thaJeztah could you suggest anyone who could look at the issue?"}}