Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Vagrant config
# vi: set ft=ruby :
current_dir = File.basename(Dir.getwd)
$script = <<-SCRIPT
#!/usr/bin/env bash
curl -sL | sudo -E bash -
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get install -y nodejs
apt-get install -y tree
apt-get install -y htop
apt-get install -y mc
apt-get install -y zsh
chsh -s $(which zsh)
cd /home/vagrant/#{current_dir} && npm install --no-bin-link
Vagrant.configure("2") do |config| = "ubuntu/bionic64"
config.vm.hostname = "dev" :forwarded_port, guest: 80, host: 3000 "private_network", ip: ""
config.vm.provider "virtualbox" do |vb| = current_dir
vb.memory = "4096"
config.vm.synced_folder ".", "/home/vagrant/#{current_dir}"
config.vm.provision :shell, inline: $script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment