From 31537ccdae3e876ffeb43a7a49e55127079e62a3 Mon Sep 17 00:00:00 2001 From: Deepak S Date: Fri, 26 Jan 2018 13:07:44 +0530 Subject: Adding support to pull docker images behind proxy This patch creates a http_proxy.conf in docker service, to enable docker commands behind the proxy Change-Id: Iac38a086026c11e89e534728467dc7da0e01ba59 Signed-off-by: Deepak S --- nsb_setup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nsb_setup.sh b/nsb_setup.sh index cb44839af..4a8e4db93 100755 --- a/nsb_setup.sh +++ b/nsb_setup.sh @@ -42,6 +42,16 @@ proxy_env: https_proxy: ${https_proxy} no_proxy: ${no_proxy} EOF + + mkdir -p /etc/systemd/system/docker.service.d + cat < /etc/systemd/system/docker.service.d/http-proxy.conf +--- +[Service] +Environment="HTTP_PROXY=${http_proxy}" "HTTPS_PROXY=${https_proxy}" "NO_PROXY=${no_proxy}" +EOF + + systemctl daemon-reload + systemctl restart docker fi apt-get update > /dev/null 2>&1 -- cgit 1.2.3-korg