353b302eed
Add proxy/no_proxy in bootstrap_capo Makefile and correct/add proxy/no_proxy in image builder docker proxy playbook Change-Id: I3dcf3a3303e718f2f8bd5dfa24d9232599249d3f
12 lines
631 B
Bash
Executable File
12 lines
631 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ! -f /etc/systemd/system/docker.service.d/http-proxy.conf ]; then
|
|
sudo mkdir -p /etc/systemd/system/docker.service.d
|
|
sudo sh -c 'echo "[Service]" > /etc/systemd/system/docker.service.d/http-proxy.conf'
|
|
sudo sh -c "echo \"Environment=\\\"HTTP_PROXY=$1\\\"\" >> /etc/systemd/system/docker.service.d/http-proxy.conf"
|
|
sudo sh -c "echo \"Environment=\\\"HTTPS_PROXY=$1\\\"\" >> /etc/systemd/system/docker.service.d/http-proxy.conf"
|
|
sudo sh -c "echo \"Environment=\\\"NO_PROXY=$2\\\"\" >> /etc/systemd/system/docker.service.d/http-proxy.conf"
|
|
sudo systemctl daemon-reload
|
|
sudo systemctl restart docker
|
|
fi
|