docker-compose build和http_proxy

我想testingELK。 它工作正常,当我想要做一个

docker-compose up 

在代理之后

 docker-compose up --no-recreate Building kibana Step 1 : FROM kibana:latest ---> 544887fbfa30 Step 2 : RUN apt-get update && apt-get install -y netcat ---> Running in 794342b9d807 

它失败了

 W: Some index files failed to download. They have been ignored, or old ones used instead. 

是'好吧

 docker build --build-arg http_proxy=http://proxy:3128 --build-arg https_proxy=http://proxy:3128 kibana 

但是当我重做docker的时候,il试图重新构build,而不能通过代理

任何帮助?

您需要docker-compose 1.6.0-rc1才能通过docker-compose将代理传递给您的构build。
问题2163,请参阅PR 2653的 提交47e53b4 。

将所有构build相关的configuration移动到服务中的build:部分。
例:

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

我遇到了同样的问题。 是什么帮助我使用了明确的版本2.2,然后按照文档中的描述构build – args和 – network。

你在干净的机器上试过吗?

 docker-machine stop default docker-machine create -d virtualbox test docker-machine start test eval $(docker-machine env test) docker-compose up