forked from brandon-rhodes/fopnp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootinit.sh
executable file
·32 lines (24 loc) · 1003 Bytes
/
bootinit.sh
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
#!/bin/bash
#
# Given the presence of a working "boot2docker-cli" tool, use it to
# create a "boot2docker-vm" and then transform it into a "playground-vm"
# ready for release.
set -e
boot2docker-cli init
VBoxManage modifyvm boot2docker-vm --natpf1 h1,tcp,127.0.0.1,2201,,2201
VBoxManage modifyvm boot2docker-vm --natpf1 h2,tcp,127.0.0.1,2202,,2202
VBoxManage modifyvm boot2docker-vm --natpf1 h3,tcp,127.0.0.1,2203,,2203
VBoxManage modifyvm boot2docker-vm --natpf1 h4,tcp,127.0.0.1,2204,,2204
boot2docker-cli start
$(boot2docker-cli shellinit)
boot2docker-cli ssh /bin/sh <<'EOF'
cd /var/lib/boot2docker
sudo wget ftp://ftp.nl.netbsd.org/vol/2/metalab/distributions/tinycorelinux/4.x/x86/tcz/bridge-utils.tcz
sudo mkdir fopnp
sudo chown docker.staff fopnp
git clone https://github.com/brandon-rhodes/fopnp.git
sudo cp fopnp/playground/bootlocal.sh .
fopnp/playground/build.sh
EOF
boot2docker-cli stop || sleep 1
VBoxManage modifyvm boot2docker-vm --name playground-vm