I’m working through the “Getting Started with Docker” tutorial. I’m working within a corporate network. I followed the troubleshooting hints and edited /var/lib/boot2docker/profile in my default docker machine to configure it for the corporate network proxy. That worked and allowed general access beyond the corporate network.
However, when I reached the “Build your own image” step in the tutorial I the apt-get of archive.ubuntu.com is failing during the build saying that it cannot connect. I see that this is an IPv6 address and perhaps that is the issue. I’ve read through the docs I can find on IPv6, but have not been able to figure this out. This seems like it may be a general issue, but I could not find a solution in the forums. If I’ve missed it, please point me in the right direction.
Expected behavior
The build should succeed and apt-get should be able to connect with archive.ubuntu.com.
Actual behavior
The build fails because apt-get cannot connect to archive.ubuntu.com
Information
I’m running this on my laptop running Windows 7.
Docker version: 1.11.2
I verified that I can connect to http://archive.ubuntu.com via FireFox from my laptop.
My guess is that this is related to the fact that this is an IPv6 address and for some reason this is not working.
Steps to reproduce the behavior
See https://docs.docker.com/windows/step_four/ for the context.
Here is the Dockerfile:
FROM docker/whalesay:latest
RUN apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortunes -a | cowsay
The command run:
$ docker build -t docker-whale .
The first part of the output from the command:
[The Docker forums disallow me from including more than two links, so have to modify the output to not show the URLs as links. So I’ve replaced http:// with LINK/]
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM docker/whalesay:latest
—> 6b362a9f73eb
Step 2 : RUN apt-get -y update && apt-get install -y fortunes
—> Running in 9542e94271ab
Err LINK/archive.ubuntu.com trusty InRelease
Err LINK/archive.ubuntu.com trusty-updates InRelease
Err LINK/archive.ubuntu.com trusty-security InRelease
Err LINK/archive.ubuntu.com trusty Release.gpg
Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1560:8001::11). - connect (101: Network is unreachable) [IP: 2001:67c:15
60:8001::11 80]
Err LINK/archive.ubuntu.com trusty-updates Release.gpg
Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1560:8001::11). - connect (101: Network is unreachable) [IP: 2001:67c:15
60:8001::11 80]
Err LINK/archive.ubuntu.com trusty-security Release.gpg
Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1560:8001::11). - connect (101: Network is unreachable) [IP: 2001:67c:15
60:8001::11 80]
[Many more lines of output with similar errors]
In case it is relevant here are the changes I made to /var/lib/boot2docker/profile with the internal names of the proxy replaced with XXX:
export "HTTP_PROXY=XXX-proxy.XXXXX.com:80"
export "HTTPS_PROXY=XXX-proxy.XXXXX.com:80"
export “NO_PROXY=192.168.99.,.local,169.254/16,.example.com,192.168.59.”