Last active
September 3, 2016 15:31
-
-
Save antillean/7d79385ea077aa4858bfbc4c8fcc01c5 to your computer and use it in GitHub Desktop.
A Vagrantfile I put in the root of my Windows workspace to make a nice Linux dev env for Java things
This file contains hidden or 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 : | |
# https://docs.vagrantup.com. | |
Vagrant.configure("2") do |config| | |
# Every Vagrant development environment requires a box. You can search for | |
# boxes at https://atlas.hashicorp.com/search. | |
config.vm.box = "boxcutter/ubuntu1604" | |
# config.vm.synced_folder ".", "/vagrant" | |
config.vm.provider "virtualbox" do |vb| | |
vb.name = "workspace" | |
vb.memory = "1024" | |
vb.cpus = 2 | |
end | |
## Copy up some important files. | |
config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" | |
config.vm.provision "file", source: "~/.ssh/id_rsa", destination: ".ssh/id_rsa" | |
## Provision the VM with a shell script. NOTE: This runs as root in /home/vagrant! | |
config.vm.provision "shell", inline: <<-SHELL | |
## Install most things | |
apt-get update -y | |
# apt-get upgrade -y | |
apt-get install -y default-jdk git nano unzip gradle | |
## Took out groovy from above cuz I think gradle installs groovy. Put back in if it doesn't. | |
## Finish up ssh config | |
chmod 600 -R .ssh/* | |
## Finish up git config | |
sudo su - vagrant -c \"git config --global core.editor nano\" | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment