diff options
author | 2018-01-26 13:07:44 +0530 | |
---|---|---|
committer | 2018-01-27 02:39:10 +0000 | |
commit | 31537ccdae3e876ffeb43a7a49e55127079e62a3 (patch) | |
tree | 0f95fe32631baec504e4bba00c78f937f452dc68 /nsb_setup.sh | |
parent | e67082ecf9c89eeebbdf2c87b0a90e3edef2eabd (diff) |
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 <deepak.s@linux.intel.com>
Diffstat (limited to 'nsb_setup.sh')
-rwxr-xr-x | nsb_setup.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 <<EOF > /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 |