summaryrefslogtreecommitdiffstats
path: root/deliveries/os_Dockerfile
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-06-14 15:32:06 -0700
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-07-05 10:17:55 -0700
commit47d9cadde3ea38210db0324564960a9853d863a2 (patch)
tree6256b9d33fd9e92854edc4df072087424ffd59be /deliveries/os_Dockerfile
parent627badaf69987c01811c477219fd943757a635f5 (diff)
Add proxy support in DockerFile
This helps to build Portal Docker image behind a proxy. Change-Id: I65fdd952ef9a9060f87dbbdc5a16909c825b493e Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'deliveries/os_Dockerfile')
-rw-r--r--deliveries/os_Dockerfile9
1 files changed, 9 insertions, 0 deletions
diff --git a/deliveries/os_Dockerfile b/deliveries/os_Dockerfile
index efba0bdd..56faa6ad 100644
--- a/deliveries/os_Dockerfile
+++ b/deliveries/os_Dockerfile
@@ -3,6 +3,15 @@
FROM ubuntu:14.04
+ARG HTTP_PROXY=${HTTP_PROXY}
+ARG HTTPS_PROXY=${HTTPS_PROXY}
+
+ENV http_proxy $HTTP_PROXY
+ENV https_proxy $HTTPS_PROXY
+
+RUN 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
+
# Install the python script required for "add-apt-repository"
RUN apt-get update && apt-get install -y software-properties-common