# docker run --rm alpine:3.6 wget http://google.com
Connecting to google.com (216.58.194.206:80)
wget: error getting response: Connection reset by peer
However, alpine:3.5 is fine.
Docker version 17.04.0-ce, build 78d1802
Bare metal host: openSUSE Leap 42.3 with 4.4.87-25-default kernel.
ping -c1 google.com works even on alpine:3.6.
I can't reproduce: :confused:
$ docker run -it --rm alpine:3.6 wget http://google.com
Connecting to google.com (172.217.11.78:80)
Connecting to www.google.com (172.217.11.164:80)
index.html 100% |*******************************| 11726 0:00:00 ETA
@tianon On what operating system did you tried it?
I cannot reproduce either (on my linux desktop):
````console
ncopa-desktop:~$ docker run --rm alpine:3.6 wget http://google.com
Connecting to google.com (216.58.201.174:80)
Connecting to www.google.no (216.58.201.163:80)
index.html 100% |*********| 11060 0:00:00 ETA
````
Same on my macbook.
Do you use http proxy?
@ncopa Nope, no HTTP proxy is involved. Tried wget 127.0.0.1 as well, but no luck.
My test was also on a Linux desktop, but I've also just verified on http://play-with-docker.com/ for good measure (and it works fine there as well, so this is very likely something broken in your local environment).
Have you tried pulling the latest alpine:3.6 image (docker pull alpine:3.6)? Do you have any kind of firewall in place, including/especially one you don't control, such as are common in many corporate and educational environments?
Yes, I tried alpine:3.6 as well:

There is probably some kind of firewall included, I am on closed corporate network (inbound-wise), but I don't know anything about it... What I do see is that alpine:3.5 is fine and alpine:3.6 fails to connect. Still for sure it could be something in the network or in the underlying operating system.
If you know how could one debug it (e.g. from network perspective), I might give it a try.
@mnowaksuse: Alpine 3.6 packages Busybox 1.26.2, which is what provides wget in the default build, but it has a bug connecting to some servers or middleboxes: I've hit this when connecting to Nginx acting as a TCP proxy that would forward requests to a HTTP server.
The fix here might be to install the wget package, which provides the actual wget binary, as opposed to using Busybox for wget.
Alternatively, I believe the _next_ Alpine version will include Busybox 1.27, where this issue is fixed. Can you try using alpine:edge here: docker run --rm alpine:edge wget http://google.com?
Thanks @krallin! That's probably it. apline:edge works just fine. That might explain why others who connected from different places with the same OS as me were able to use alpine:3.6.
Happy to help @mnowaksuse :)
@krallin @andyshinn I'm getting an even weirder error:
$ docker run --rm alpine:3.6 wget http://google.com
Connecting to docker.for.mac.localhost:7769 (192.168.65.1:7769)
wget: server returned error: HTTP/1.1 500 Internal Server Error
I don't understand why it would try to connect to docker.for.mac.localhost:7769. This happens regardless of what I request.
I still see it when using 3.5 or edge although it seems to work:
$ docker run --rm alpine:3.5 wget http://google.com
Connecting to docker.for.mac.localhost:7769 (192.168.65.1:7769)
index.html 100% |*******************************| 11864 0:00:00 ETA
@krallin @andyshinn nevermind, I'm using an app called freedom.to that blocks distracting websites (though not google.com, of course), and quitting that app makes the command work. I guess it's the same wget bug that @krallin mentioned.
doesn't work with 3.7 either but works with 3.5
For Googlers: I saw similar issues with Alpine 3.10 (and tlmgr, FWIW); installing package wget did indeed help.
There is even issue with Alpine 3.12 and wget BusyBox v1.31.1 () multi-call binary.
its failing with wget: server returned error: HTTP/1.1 307 Temporary Redirect
Most helpful comment
@mnowaksuse: Alpine 3.6 packages Busybox 1.26.2, which is what provides
wgetin the default build, but it has a bug connecting to some servers or middleboxes: I've hit this when connecting to Nginx acting as a TCP proxy that would forward requests to a HTTP server.The fix here might be to install the
wgetpackage, which provides the actualwgetbinary, as opposed to using Busybox forwget.Alternatively, I believe the _next_ Alpine version will include Busybox 1.27, where this issue is fixed. Can you try using
alpine:edgehere:docker run --rm alpine:edge wget http://google.com?