Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
My working minimalist Vagrantfile with everything I have used so far in my use of Vagrant
Vagrant.configure(2) do |config|
config.vm.define VAGRANTFILE_CLIENT_NAME do |localdevbox| = "localdev"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine. "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# "private_network", ip: ""
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# "public_network"
localdevbox.vm.synced_folder ".", "/var/www", :owner=> 'vagrant', :group=>'www-data', :mount_options => ['dmode=775', 'fmode=775']
config.vm.provider "virtualbox" do |vb| = VAGRANTFILE_CLIENT_NAME
# Tell vagrant to use the host computer as resolver
# vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# Display the VirtualBox GUI when booting the machine
# vb.gui = true
# Customize the amount of memory on the VM:
# vb.memory = "1024"
#config.vm.provision "shell", inline: "sudo apt-get update && sudo apt-get upgrade -y"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.