Skip to content

Commit

Permalink
use https[s] proxy in docker for release build if necessary (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnunu authored Nov 17, 2021
1 parent 2369aef commit 709cd7b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hack/lib/release-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ function build_multi_arch_binaries() {
# use goproxy if build from inside mainland China
[[ $region == "cn" ]] && docker_run_opts+=("--env GOPROXY=https://goproxy.cn")

# use proxy if set
[[ -n ${http_proxy+x} ]] && docker_run_opts+=("--env http_proxy=${http_proxy}")
[[ -n ${https_proxy+x} ]] && docker_run_opts+=("--env https_proxy=${https_proxy}")

local docker_run_cmd=(
"/bin/sh"
"-xe"
Expand Down Expand Up @@ -181,4 +185,4 @@ build_images() {

build_multi_arch_binaries
build_docker_image
}
}

0 comments on commit 709cd7b

Please sign in to comment.