diff options
-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 |