Add proxy support 35/5035/1
authorVictor Morales <victor.morales@intel.com>
Wed, 14 Jun 2017 19:45:20 +0000 (14:45 -0500)
committerVictor Morales <victor.morales@intel.com>
Wed, 14 Jun 2017 19:45:20 +0000 (14:45 -0500)
It's not possible to build the Docker images behind a corporate
proxy. This change adds support to HTTP and HTTPS protocols for
creation of images.

Change-Id: Iabe675d86e2879270dda069179b7b854da0a93bd
Signed-off-by: Victor Morales <victor.morales@intel.com>
sdc-os-chef/sdc-backend/Dockerfile
sdc-os-chef/sdc-cassandra/Dockerfile
sdc-os-chef/sdc-elasticsearch/Dockerfile
sdc-os-chef/sdc-frontend/Dockerfile
sdc-os-chef/sdc-kibana/Dockerfile
sdc-os-chef/sdc-sanity/Dockerfile

index e43a156..0dde50e 100644 (file)
@@ -1,4 +1,13 @@
-FROM jetty:9.3-jre8
+FROM jetty:9.3.15-jre8
+
+ARG HTTP_PROXY
+ARG 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 
 
 RUN apt-get -y update
 RUN apt-get -y install apt-utils
index 3e9295d..7af6de1 100644 (file)
@@ -1,5 +1,14 @@
 FROM cassandra:2.1.17
 
+ARG HTTP_PROXY
+ARG 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 
+
 #ENV DEBIAN_FRONTEND noninteractive
 RUN apt-get -y update && apt-get -y install --no-install-recommends \
     curl   \
index de3d43e..89516a6 100644 (file)
@@ -1,5 +1,14 @@
 FROM elasticsearch:2.1.2
 
+ARG HTTP_PROXY
+ARG 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 
+
 RUN apt-get -y update
 RUN apt-get -y install apt-utils
 RUN apt-get -y install curl
index a59d868..17034ef 100644 (file)
@@ -1,5 +1,14 @@
 FROM jetty:9.3.15-jre8
 
+ARG HTTP_PROXY
+ARG 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 
+
 RUN apt-get -y update
 RUN apt-get -y install apt-utils
 RUN apt-get -y install curl
index be5446e..a42225a 100644 (file)
@@ -1,5 +1,14 @@
 FROM kibana:4.3.3
 
+ARG HTTP_PROXY
+ARG 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 
+
 RUN apt-get -y update
 RUN apt-get -y install curl
 RUN apt-get -y install vim
index dd48610..2b29131 100644 (file)
@@ -1,4 +1,13 @@
 FROM ubuntu
+
+ARG HTTP_PROXY
+ARG 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 
 RUN apt-get -y update && apt-get -y install --no-install-recommends apt-utils
 RUN apt-get -y install curl
 RUN apt-get -y install vim