LoginSignup
32
29

More than 5 years have passed since last update.

Vagrant ファイル共有 決定版

Last updated at Posted at 2018-01-12

忘れないためのメモ

デフォルトの位置
hostのフォルダは、[Vagrantfileのあるフォルダ]
guest(vagrant)のフォルダは、[/vagrant]
また、設定することもできる
config.vm.synced_folder "host_path", "guest_path"
私の場合

Vagrantfile
config.vm.synced_folder "{Vagrantfileのフォルダ}/workspace" "/home/vagrant/workspace"

みたいな感じ

Vagrantfileの横にworkspaceのフォルダを作って
vagrantのホームディレクトリにあるworkspaceと共有する。

しかし...

これだけでは、おそらく共有されない。
ホストマシンの方で

host-terminal
$ vagrant plugin install vagrant-vbguest
$ vagrant reload //再起動、または起動

私は、これでいけました。
vagrant楽しい!!

32
29
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
32
29