/
Vagrantfile
76 lines (59 loc) · 2.2 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
sudo tee /etc/apk/repositories > /dev/null <<EOF
http://nl.alpinelinux.org/alpine/v3.3/main
http://nl.alpinelinux.org/alpine/edge/main
http://nl.alpinelinux.org/alpine/edge/community
EOF
sudo apk update
sudo apk add docker && \
sudo adduser ${USER} docker
sudo adduser ${USER} root
sudo service docker start
sudo apk add make python3 && \
sudo python3 -m ensurepip && \
sudo rm -r /usr/lib/python*/ensurepip && \
sudo pip3 install --upgrade pip setuptools && \
sudo pip3 install virtualenv
cd /vagrant && \
make install
tee /home/vagrant/.pypirc > /dev/null <<EOF
[distutils]
index-servers =
pypi
pypitest
[pypitest]
repository = https://testpypi.python.org/pypi
username = adaptivdesign
[pypi]
repository = https://pypi.python.org/pypi
username = adaptivdesign
EOF
SCRIPT
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "maier/alpine-3.3.1-x86_64"
# Disable default share if not using shared folders so Vagrant will not block attempting to mount the volume.
config.vm.synced_folder '.', '/vagrant', type: "nfs"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine.
config.vm.network "forwarded_port", guest: 8080, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.100.10"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant.
config.vm.provider "virtualbox" do |vb|
vb.memory = 1024
end
config.vm.provision "shell", inline: $script, privileged: false
end