From f15341efae1ddb4e2a4b991ea58bd998a95c6ccc Mon Sep 17 00:00:00 2001 From: "GU Yu (Byron)" Date: Fri, 22 Jan 2016 14:34:13 +0800 Subject: [PATCH] Run docker in vagrant --- .gitignore | 1 + Vagrantfile | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index d84a08f7b94c..e42e4ec77017 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ samples/client/petstore/python/.venv/ *.pm~ *.xml~ *.t~ +.vagrant/ diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 000000000000..a914db0a1e30 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,34 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + + config.vm.box = "ubuntu/trusty64" + + config.vm.provider "virtualbox" do |v| + v.name = "swagger-codegen" + v.memory = 2048 + v.cpus = 2 + end + + config.vm.box_check_update = true + + #SSH + config.ssh.forward_agent = true + + config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" + + #Provision + config.vm.provision "shell", inline: <<-SHELL + sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D + sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list' + sudo apt-cache policy docker-engine + sudo apt-get update + sudo apt-get upgrade -y + sudo apt-get install -y docker-engine + SHELL + +end