Unifying proxy variables for docker build
This patch adds proxy-related variables to 'docker build' command. Change-Id: Ia494f1a90328c80681f9cbe31763b4d2058042b1
This commit is contained in:
parent
45654cc90b
commit
d30e9b8660
9
Makefile
9
Makefile
@ -18,6 +18,7 @@ IMAGE_PREFIX ?= attcomdev
|
|||||||
IMAGE_TAG ?= latest
|
IMAGE_TAG ?= latest
|
||||||
HELM ?= helm
|
HELM ?= helm
|
||||||
PROXY ?= http://proxy.foo.com:8000
|
PROXY ?= http://proxy.foo.com:8000
|
||||||
|
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
||||||
USE_PROXY ?= false
|
USE_PROXY ?= false
|
||||||
PUSH_IMAGE ?= false
|
PUSH_IMAGE ?= false
|
||||||
LABEL ?= commit-id
|
LABEL ?= commit-id
|
||||||
@ -52,7 +53,13 @@ tests:
|
|||||||
.PHONY: build_deckhand
|
.PHONY: build_deckhand
|
||||||
build_deckhand:
|
build_deckhand:
|
||||||
ifeq ($(USE_PROXY), true)
|
ifeq ($(USE_PROXY), true)
|
||||||
docker build --network host -t $(IMAGE) --label $(LABEL) -f images/deckhand/Dockerfile . --build-arg HTTP_PROXY=$(PROXY) --build-arg HTTPS_PROXY=$(PROXY)
|
docker build --network host -t $(IMAGE) --label $(LABEL) -f images/deckhand/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
|
else
|
||||||
docker build --network host -t $(IMAGE) --label $(LABEL) -f images/deckhand/Dockerfile .
|
docker build --network host -t $(IMAGE) --label $(LABEL) -f images/deckhand/Dockerfile .
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user