summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-06-16 12:28:06 -0500
committerVictor Morales <victor.morales@intel.com>2017-06-16 12:28:06 -0500
commit7b6f09cc92e6fe93b80b21317df15a0c0802e95c (patch)
tree37012a7dae7d67240f586ce49ce469ae8093ed91
parent8911aea5e891453dd03337d98399070565392a90 (diff)
Add proxy support
It was included the instructions to build dcae-controller image behind a corporate proxy. Change-Id: I8a22aa69fa5d2a82aa0f7f6035cc9b5f56f6cb59 Signed-off-by: Victor Morales <victor.morales@intel.com>
-rw-r--r--dcae-demo-controller/src/main/docker-build/build.sh10
-rw-r--r--dcae-demo-controller/src/main/docker-build/controller-install.sh3
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