/
Vagrantfile
57 lines (45 loc) · 1.97 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# 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|
config.vm.box = "ubuntu/focal64"
config.ssh.forward_agent = true
config.ssh.insert_key = false
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
vb.memory = "4096"
end
config.vm.provision "shell", inline: <<-SHELL
set -e
sudo apt update -q
sudo apt upgrade -qqy
wget -qO - https://deb.nodesource.com/setup_16.x | bash -
apt-get install -qqy nodejs
sudo -iu vagrant npx -y saltcorn-install -s -y
# install docker
sudo -y apt-get update
sudo -y apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
# add user saltcorn to docker group
# and build the cordova-builder image
sudo groupadd docker
sudo usermod -aG docker saltcorn
sudo -u saltcorn /home/saltcorn/.local/bin/saltcorn build-cordova-builder
cd /home/saltcorn
sudo -u saltcorn /home/saltcorn/.local/bin/saltcorn install-pack -n "Address book"
sudo -u saltcorn /home/saltcorn/.local/bin/saltcorn build-app -p "android" -s "http://10.0.2.2" -b "/home/saltcorn/build_dir" -e "EditPerson" -d
SHELL
end