-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
49 lines (39 loc) · 1.51 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Base box to build off, and download URL for when it doesn't exist on the user's system already
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vbox|
vbox.name = "derby-notebook"
vbox.memory = 1024
vbox.cpus = 2
end
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
config.vm.network "forwarded_port", guest: 8888, host: 8888,
auto_correct: true
config.vm.network "forwarded_port", guest: 9999, host: 9999,
auto_correct: true
# Enable provisioning with a shell script.
config.vm.provision :shell,
inline: <<-eos
add-apt-repository ppa:docker-maint/testing
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
apt-get autoremove -y
apt-get install -y docker.io
usermod -a -G docker vagrant
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py
/usr/local/bin/pip install -U --pre docker-compose
yes | /usr/local/bin/pip uninstall requests
/usr/local/bin/pip install requests==2.4.3
for IMG in dockerfile/nodejs dockerfile/mongodb ipython/notebook redis;
do
docker pull $IMG
done
docker rm $(docker ps -aq)
docker rmi $(docker images -qf "dangling=true")
cd /vagrant && docker-compose build
eos
end