Docker-compose build and http_proxy

I want to check ELK. It works great BUt when I want to do

docker-compose up

for proxy

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

Failed

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

"OK with

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

But when I repeat the docker assembly, il tries to rebuild and was unable to go through the proxy

Any help?

+4
source share
3 answers

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

Move the entire build-related configuration to a section build:in the service.
Example:

web:
  build:
    context: .
    dockerfile: Dockerfile.name
    args:
       key: value
+7
source

. , , 2.2, build - args - network, .

0

Did you try it on a clean machine?

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

Source: https://habr.com/ru/post/1625811/


All Articles