Support proxy for krm function build
Signed-off-by: Andrii Ostapenko <anost1986@gmail.com> Change-Id: I749931028e0a2a667619fb497f6b1396fd2ee8ca
This commit is contained in:
parent
efca83730b
commit
1767e4dac4
@ -196,7 +196,18 @@ endif
|
||||
done
|
||||
|
||||
krm_base_image:
|
||||
set -ex
|
||||
ifneq ($(PROXY), )
|
||||
sudo -E docker build krm-function -t $(KRM_BASE_IMAGE) \
|
||||
--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
|
||||
sudo -E docker build krm-function -t $(KRM_BASE_IMAGE)
|
||||
endif
|
||||
|
||||
docker_build:
|
||||
set -ex
|
||||
|
@ -1,4 +1,13 @@
|
||||
FROM quay.io/airshipit/golang:1.16.8-buster
|
||||
ARG FROM=quay.io/airshipit/golang:1.16.8-buster
|
||||
FROM ${FROM}
|
||||
|
||||
ARG HTTP_PROXY
|
||||
ARG HTTPS_PROXY
|
||||
ARG NO_PROXY
|
||||
ARG http_proxy
|
||||
ARG https_proxy
|
||||
ARG no_proxy
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user