Skip to content

Instantly share code, notes, and snippets.

@igilham
Last active June 22, 2017 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igilham/d8037fe6ef0a46aae70ac9d93992f3fe to your computer and use it in GitHub Desktop.
Save igilham/d8037fe6ef0a46aae70ac9d93992f3fe to your computer and use it in GitHub Desktop.
Vagrantfile for basic C++ development
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Requires the vagrant-vbguest plugin
# vagrant plugin install vagrant-vbguest
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
# sets up the parent directory as the synced folder, so you can place the Vagrantfile in a sub-dir in your workspace
# e.g.
# ~/workspace/
# ~/workspace/vm-cpp
# ~/workspace/vm-cpp/Vagrantfile
config.vm.synced_folder "..", "/vagrant",
owner: "vagrant", group: "vagrant", type: "virtualbox"
config.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 2
vb.name = "vm-cpp"
end
config.vm.provision "shell", inline: <<-SHELL
yum update -y
yum install -y epel-release
yum install -y gcc-c++ cmake3 make rpm-build valgrind pam-devel ncurses-devel openssl-devel
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment