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 theenvvar
is unset or empty, the builder will not apply proxy, otherwise it will.
I ran into the same problem. What helped me was using the explicit version 2.2 and then build - args and - network as described in the documentation.
did you try it on clean machine?
docker-machine stop defaultdocker-machine create -d virtualbox testdocker-machine start testeval $(docker-machine env test)docker-compose up