diff options
-rw-r--r-- | deployment/heat/onap-oom/rancher_vm_entrypoint.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh index da1955446..ac704f106 100644 --- a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh +++ b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh @@ -3,15 +3,19 @@ printenv echo `hostname -I` `hostname` >> /etc/hosts mkdir -p /etc/docker -cat > /etc/docker/daemon.json <<EOF +if [ ! -z "__docker_proxy__" ]; then + cat > /etc/docker/daemon.json <<EOF { "insecure-registries" : ["__docker_proxy__"] } EOF -cat > /etc/apt/apt.conf.d/30proxy<<EOF +fi +if [ ! -z "__apt_proxy__" ]; then + cat > /etc/apt/apt.conf.d/30proxy<<EOF Acquire::http { Proxy "http://__apt_proxy__"; }; Acquire::https::Proxy "DIRECT"; EOF +fi apt-get -y update apt-get -y install docker.io usermod -aG docker ubuntu |