Last active
October 26, 2016 07:53
-
-
Save gutchom/ee216e47431f40370d71e2516d1be8e3 to your computer and use it in GitHub Desktop.
CentOS 7.2 with Git & ndenv & ~/share
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "centos72" | |
config.vm.box_url = "https://github.com/CommanderK5/packer-centos-template/releases/download/0.7.2/vagrant-centos-7.2.box" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.synced_folder "./share", "/home/vagrant/share", create: true | |
config.ssh.forward_agent = true | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = false | |
vb.memory = "1024" | |
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] | |
end | |
config.vm.provision "shell", inline: <<-EOT | |
yum update | |
yum install -y git | |
EOT | |
config.vm.provision "shell", privileged: false, inline: <<-EOT | |
git clone https://github.com/riywo/ndenv.git ~/.ndenv | |
git clone https://github.com/riywo/node-build.git ~/.ndenv/plugins/node-build | |
echo 'export PATH="$HOME/.ndenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(ndenv init -)"' >> ~/.bash_profile | |
EOT | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment