Docker: support build behind proxy
This PS adds support to build behind a corp proxy. Change-Id: I6dbcb84dc731084bdca29c0561c1fb3694157888 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
84694989b6
commit
d9d67c60cc
12
Makefile
12
Makefile
@ -18,6 +18,9 @@ IMAGE_PREFIX ?= attcomdev
|
|||||||
IMAGE_NAME ?= armada
|
IMAGE_NAME ?= armada
|
||||||
IMAGE_TAG ?= latest
|
IMAGE_TAG ?= latest
|
||||||
HELM ?= helm
|
HELM ?= helm
|
||||||
|
PROXY ?= http://proxy.foo.com:8000
|
||||||
|
USE_PROXY ?= false
|
||||||
|
PUSH_IMAGE ?= false
|
||||||
LABEL ?= commit-id
|
LABEL ?= commit-id
|
||||||
PYTHON = python3
|
PYTHON = python3
|
||||||
CHARTS := $(patsubst charts/%/.,%,$(wildcard charts/*/.))
|
CHARTS := $(patsubst charts/%/.,%,$(wildcard charts/*/.))
|
||||||
@ -98,7 +101,14 @@ build_docs:
|
|||||||
|
|
||||||
.PHONY: build_armada
|
.PHONY: build_armada
|
||||||
build_armada:
|
build_armada:
|
||||||
docker build -t $(IMAGE) --label $(LABEL) .
|
ifeq ($(USE_PROXY), true)
|
||||||
|
docker build --network host -t $(IMAGE) --label $(LABEL) -f ./Dockerfile . --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY)
|
||||||
|
else
|
||||||
|
docker build --network host -t $(IMAGE) --label $(LABEL) -f ./Dockerfile .
|
||||||
|
endif
|
||||||
|
ifeq ($(PUSH_IMAGE), true)
|
||||||
|
docker push $(IMAGE)
|
||||||
|
endif
|
||||||
|
|
||||||
# make tools
|
# make tools
|
||||||
.PHONY: protoc
|
.PHONY: protoc
|
||||||
|
Loading…
Reference in New Issue
Block a user