docker-compose build and http_proxy

You will need docker-compose 1.6.0-rc1 in order to pass the proxy to your build through docker-compose.
See commit 47e53b4 from PR 2653 for issue 2163.

Move all build related configuration into a build: section in the service.
Example:

web:
  build:
    context: .
    dockerfile: Dockerfile.name
    args:
       key: value

As mkjeldsen points out in the comments

If key should assume the value of an environment variable of the same name, value can be omitted (docker-compose ARGS):

Especially useful for https_proxy: if the envvar is unset or empty, the builder will not apply proxy, otherwise it will.