5
4

More than 5 years have passed since last update.

Vagrantfileでboxのバージョンを指定する方法

Posted at

いつも使っているScotch Boxがバージョンアップして、初回起動時にバージョン3.0を読み込んでしまうため、バージョンを指定してBoxを落としてくる方法を調べた。

案件的には、まだまだPHP5系が多いので。。。

Vagrantfileを修正する。


# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

    config.vm.box = "scotch/box"
+   config.vm.box_version = "2.5"
    config.vm.network "private_network", ip: "192.168.33.10"
    config.vm.hostname = "scotchbox"
    config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }

end

config.vm.box_version = "2.5"を追加してバージョンを指定してあげれば良い。


参考サイト

5
4
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
5
4