From eaaa3d67e5dfe02c382527a16a2b62737f043329 Mon Sep 17 00:00:00 2001 From: Roman Gorshunov Date: Fri, 22 Jun 2018 14:35:19 +0200 Subject: [PATCH] Unifying proxy variables for tox and docker build This patch adds proxy-related variables to tox and 'docker build' commands. Change-Id: Ic87aec9448a16a469bc630f76cf31ed0e34dae4e --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e46c530d..d1f0163f 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ IMAGE_NAME ?= armada IMAGE_TAG ?= latest HELM ?= helm PROXY ?= http://proxy.foo.com:8000 +NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local USE_PROXY ?= false PUSH_IMAGE ?= false LABEL ?= commit-id @@ -102,7 +103,13 @@ build_docs: .PHONY: build_armada build_armada: ifeq ($(USE_PROXY), true) - docker build --network host -t $(IMAGE) --label $(LABEL) -f ./Dockerfile . --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY) + docker build --network host -t $(IMAGE) --label $(LABEL) -f ./Dockerfile \ + --build-arg http_proxy=$(PROXY) \ + --build-arg https_proxy=$(PROXY) \ + --build-arg HTTP_PROXY=$(PROXY) \ + --build-arg HTTPS_PROXY=$(PROXY) \ + --build-arg no_proxy=$(NO_PROXY) \ + --build-arg NO_PROXY=$(NO_PROXY) . else docker build --network host -t $(IMAGE) --label $(LABEL) -f ./Dockerfile . endif