LoginSignup
9
10

More than 5 years have passed since last update.

VagrantFile設定あれこれ(随時更新)

Posted at

概要

VagrantFileの設定項目を、思いついたら更新していきます。

前提

下記設定項目をVagrantFileに書いたら、vagrant reload
再起動すること。

設定項目

メモリ使用量を変更

単位はMB(メガバイト)

VagrantFile.
  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
  end

パーミッションを変更

/vagrant内ではchmodが効かないので、VagrantFileで設定します。

VagrantFile.
  config.vm.synced_folder "src", "/vagrant/src",
    mount_options: ['dmode=777','fmode=700']

上記の設定で、/vagrant/src配下の
ディレクトリのパーミッションが 0777
ファイルのパーミッションが 0700
になる

参考

9
10
0

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
9
10