diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2017-06-19 14:43:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-06-19 14:43:27 +0000 |
commit | 8f2ae2aad19bdbdfc6276476f58e7cef671a113f (patch) | |
tree | 485fa20e4adb96d70067ffe65e171e9636b6150a | |
parent | f9edc738c94a5e407b531845b5d8cf905c4d6ec6 (diff) | |
parent | 7b6f09cc92e6fe93b80b21317df15a0c0802e95c (diff) |
Merge "Add proxy support"
-rw-r--r-- | dcae-demo-controller/src/main/docker-build/build.sh | 10 | ||||
-rw-r--r-- | dcae-demo-controller/src/main/docker-build/controller-install.sh | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/dcae-demo-controller/src/main/docker-build/build.sh b/dcae-demo-controller/src/main/docker-build/build.sh index 2500aa8..4c83ccb 100644 --- a/dcae-demo-controller/src/main/docker-build/build.sh +++ b/dcae-demo-controller/src/main/docker-build/build.sh @@ -31,5 +31,11 @@ if [ "$1" == "nobuild" ]; then exit; fi ## build Docker -docker build -t dcae-controller:$VERSION . - +docker_build="docker build -t dcae-controller:$VERSION ." +if [ $http_proxy ]; then + docker_build+=" --build-arg http_proxy=$http_proxy" +fi +if [ $https_proxy ]; then + docker_build+=" --build-arg https_proxy=$https_proxy" +fi +eval $docker_build diff --git a/dcae-demo-controller/src/main/docker-build/controller-install.sh b/dcae-demo-controller/src/main/docker-build/controller-install.sh index 51c4f82..2c4d23a 100644 --- a/dcae-demo-controller/src/main/docker-build/controller-install.sh +++ b/dcae-demo-controller/src/main/docker-build/controller-install.sh @@ -1,6 +1,9 @@ set -e +if [ ! -z ${http_proxy} ]; then echo "Acquire::http::proxy \"${http_proxy}\";" >> /etc/apt/apt.conf; fi && \ +if [ ! -z ${https_proxy} ]; then echo "Acquire::https::proxy \"${https_proxy}\";" >> /etc/apt/apt.conf; fi + apt-get update ; apt-get install -y maven openjdk-7-jdk curl dnsutils zip telnet ### GROOVY |