From b218fa3658200238c8dbf9419df6a85afecd8730 Mon Sep 17 00:00:00 2001 From: Jan Vales Date: Mon, 5 Nov 2018 02:56:46 +0100 Subject: [PATCH] Switch to debian stable and enable optional libvirt hypervisor. --- Vagrantfile | 8 +++++++- provision.sh | 21 +++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 86fcac6..28d02e4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,11 +1,17 @@ Vagrant.configure("2") do |config| - config.vm.box = "debian/testing64" + config.vm.box = "debian/stretch64" config.vm.provider "virtualbox" do |v| v.name = "aic18g6t4" v.memory = 2048 end + config.vm.provider "libvirt" do |v| + v.memory = 2048 + + config.vm.synced_folder ".", "/vagrant", type: "rsync" + end + # design-choice: run file in vm. config.vm.provision "shell", inline: "/vagrant/provision.sh" diff --git a/provision.sh b/provision.sh index 03cea6c..0e8417c 100755 --- a/provision.sh +++ b/provision.sh @@ -2,11 +2,24 @@ cd /vagrant -apt update -apt install -y docker.io docker-compose +############################### +# Get Docker + Docker-Compose # +############################### +apt-get update +apt-get install -y -q apt-transport-https vim -# remove stale containers (We do not care about left over images) +wget -q "https://download.docker.com/linux/debian/gpg" -O - | apt-key add +echo "deb https://download.docker.com/linux/debian stretch stable" > /etc/apt/sources.list.d/docker_com.list + +apt-get update +apt-get install -y -q docker-ce docker-compose + +################################################################### +# remove stale containers (We do not care about left over images) # +################################################################### docker rm -f $(docker ps -aq) 2>/dev/null -# recompose all +################# +# recompose all # +################# docker-compose up --build -d -- 2.43.0