11

I recently updated my docker from 1.4 to 1.5 (with the package lxc_docker).

Since then, docker daemon sends an error like this (for every command):

$ docker version 
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
FATA[0000] Error response from daemon: 404 page not found 

But if I use the previous version of the client, i get the fine answer:

$ /usr/bin/docker-old version 
Client version: 1.4.0
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 4595d4f
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

It seems to be proxy settings (HTTP_PROXY and HTTPS_PROXY variables are used on this server), and I can solve the problem by setting the NO_PROXY variable:

$ export NO_PROXY="/var/run/docker.sock"
$ docker version  
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

Do you know where this problem really come from? And how to cleanly solve it?

2 Answers 2

7

It's a new 1.5 feature, a guy from docker (@icecrime on twitter) has confirmed it. the documentation is up to date : https://github.com/docker/docker/pull/10192/files

So you don't have to cleanly solve it. This is the right way to use docker behind a proxy.

2
  • It's not a feature, it's a bug and it was fixed in version 1.6.0 – see my answer. Apr 17, 2015 at 11:01
  • Obviously this kind of "feature" has not been appreciated by users and has been fixed to the right way in 1.6.0 (github.com/docker/docker/pull/10739) which goes out yesterday. Apr 17, 2015 at 18:50
5

Do you know where this problem really come from?

The problem comes from the fact that docker needlessly (one could argue erroneously) tries to use proxy (if specified by HTTP_PROXY or HTTPS_PROXY environment variables) to access local unix domain socket at /var/run/docker.sock.

And how to cleanly solve it?

This was fixed in version 1.6.0 by not trying to use proxy in this case. As a result there's no need to add /var/run/docker.sock to NO_PROXY environment variable any more.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .