summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib
diff options
context:
space:
mode:
authorIdan Amit <ia096e@intl.att.com>2017-08-16 14:17:59 +0300
committerVictor Morales <victor.morales@intel.com>2017-08-16 13:56:02 -0500
commite17b5ec6228eb2077718d3484447912211c34e29 (patch)
tree17eca87bba9969470e85716541da2568d21013f0 /bootstrap/vagrant-onap/lib
parentd1c03409f28c32d8cb0a97d4311b58907729998e (diff)
Add further configuration for the docker engine
In order to allow local deployment of dockers and permissions for user vagrant to run docker commands Change-Id: I64d73f419efb897facd0af1b2ade9d44a165c106 Issue-Id: INT-101 Signed-off-by: Idan Amit <ia096e@intl.att.com>
Diffstat (limited to 'bootstrap/vagrant-onap/lib')
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions9
1 files changed, 6 insertions, 3 deletions
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions
index 9b903d92a..458b34c61 100755
--- a/bootstrap/vagrant-onap/lib/functions
+++ b/bootstrap/vagrant-onap/lib/functions
@@ -100,14 +100,17 @@ function install_maven {
_configure_maven
}
-# _configure_docker_proxy() - Configures proxy in Docker from ENV
-function _configure_docker_proxy {
+# _configure_docker_settings() - Configures Docker settings
+function _configure_docker_settings {
if [ $http_proxy ]; then
echo "export http_proxy=$http_proxy" >> /etc/default/docker
fi
if [ $https_proxy ]; then
echo "export https_proxy=$https_proxy" >> /etc/default/docker
fi
+
+ echo "DOCKER_OPTS=\"-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock\"" >> /etc/default/docker
+ usermod -a -G docker vagrant
}
# install_nodejs() - Download and install NodeJS
@@ -156,7 +159,7 @@ function install_docker {
$(lsb_release -cs) \
stable"
install_package docker-ce
- _configure_docker_proxy
+ _configure_docker_settings
service docker restart
sleep 10
}