From 0a3953d317f148b2fe1eda54c660fc2327c4cc55 Mon Sep 17 00:00:00 2001 From: windperson Date: Sat, 26 Mar 2016 19:26:57 +0800 Subject: [PATCH] Can run on Windows Machine without installing rsync, default vagrant sync folder configuration. --- Vagrantfile | 6 ++++++ readme.md | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 554aa62..e64751a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -42,6 +42,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| end config.vm.box = "#{VG_BOX_NAME}" + + if config.vm.box.to_s == "centos/7" + #turn off default rsync sharing in offical CentOS 7 vagrant box + config.vm.synced_folder '.', '/home/vagrant/sync', disabled: true + config.vm.synced_folder '.', '/vagrant', disabled: false + end #config.ssh.insert_key = false config.vm.hostname = 'dockerhost' diff --git a/readme.md b/readme.md index c22ed00..a3fd056 100644 --- a/readme.md +++ b/readme.md @@ -16,9 +16,9 @@ and 4 require vagrant plugins: - vagrant-triggers: https://github.com/emyl/vagrant-triggers - vagrant-persistent-storage: https://github.com/kusnier/vagrant-persistent-storage -The successfully initiated VM store its docker installation folder /var/lib/docker in separated disk file *disk_data/docker_data.vdi* , so you can backup & restore current docker image, containers and volume data even if VM deleted then recreated. +The successfully initiated VM store its docker installation folder /var/lib/docker in separated disk file **disk_data/docker_data.vdi** , so you can backup & restore current docker image, containers and volume data even if VM deleted then recreated. -Host mapping of this Vagrant project folder is /home/vagrant/sync in VM. +It use [official CentOS 7 vagrant box](https://vagrantcloud.com/centos/boxes/7) to run, and host mapping inside VM of this Vagrant project folder is **/vagrant**, the same as default vagrant configuration. You can tweak: