From 8ddae5fbe9698896486cf91bb4150694eefd4fc4 Mon Sep 17 00:00:00 2001 From: Raymond Date: Tue, 14 Nov 2017 08:19:23 -0500 Subject: [PATCH] Update to Xenial image and fix docker config commands --- Vagrantfile | 2 +- provision.sh | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index ed3ef30..0b33ae8 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,5 +1,5 @@ Vagrant.configure(2) do |config| - config.vm.box = "ubuntu/trusty64" + config.vm.box = "ubuntu/xenial64" config.vm.hostname = "docker-ubuntu16" config.vm.provision "shell", path: "provision.sh" config.vm.provider "virtualbox" do |v| diff --git a/provision.sh b/provision.sh index 10dd18c..d6adb08 100644 --- a/provision.sh +++ b/provision.sh @@ -4,12 +4,8 @@ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" apt-get update apt-get install -y docker-ce -usermod -a -G docker vagrant -mkdir -p /etc/docker -cat << EOF > /etc/docker/daemon.json -{ - "hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2376"] -} -EOF +usermod -a -G docker ubuntu +sed -i 's$fd://$fd:// -H tcp://0.0.0.0:2376$g' /lib/systemd/system/docker.service +systemctl daemon-reload service docker restart apt-get clean