VOL-546 Add support for proxy servers in build
- Propagate proxy environment variables into docker builds
- Generate mvn settings.xml based on proxy env vars and allow custom xml
- Update to latest docker installation within go-lang docker image (to avoid apt-key proxy issue)
- Allow additional parameters with DOCKER_BUILD_EXTRA_ARGS, for example --no-cache, --pull
- Also fixes 'overriding recipe for target' for voltha target
Change-Id: Ifa545a0262ecfe434ad230ddab4f61935c7244e0
(cherry picked from commit e0c9acbbd529b38da0adacdb6701cb0e37553119)
diff --git a/docker/Dockerfile.onos b/docker/Dockerfile.onos
index 4e9af3a..528d90b 100644
--- a/docker/Dockerfile.onos
+++ b/docker/Dockerfile.onos
@@ -9,8 +9,10 @@
# Build the applications
RUN mkdir -p ${DOWNLOAD_ROOT}
WORKDIR ${DOWNLOAD_ROOT}
+COPY config/mvn_settings.* ${DOWNLOAD_ROOT}/
+RUN ./mvn_settings.sh
ADD config/dependencies.xml .
-RUN mvn dependency:copy -Dmdep.useBaseVersion=true -DoutputDirectory=${DOWNLOAD_ROOT} -Dsilent=true -f dependencies.xml
+RUN mvn dependency:copy -Dmdep.useBaseVersion=true -DoutputDirectory=${DOWNLOAD_ROOT} -Dsilent=true -f dependencies.xml -s mvn_settings.xml
FROM onosproject/onos:1.10.9 as install
MAINTAINER Open Networking Foundation <info@opennetworking.org>