-
Notifications
You must be signed in to change notification settings - Fork 7
/
bootstrap.sh
35 lines (27 loc) · 1.19 KB
/
bootstrap.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
33
34
35
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install -y docker-ce
curl -LO https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
sudo tar -C /usr/local -xvzf go1.12.7.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a /home/vagrant/.bashrc
echo "export GOROOT=/usr/local/go" | tee -a /root/.bashrc
echo "export PATH=$PATH:/usr/local/go/bin" | tee -a /root/.bashrc
mkdir -p /home/vagrant/containers/
echo "export GOPATH=/vagrant/demo" | tee -a /home/vagrant/.bashrc
echo "export GOPATH=/vagrant/demo" | tee -a /root/.bashrc
mkdir -p /home/vagrant/containers/fs/rootfs-alpine/
mkdir -p /home/vagrant/containers/fs/rootfs-ubuntu/
tar -xzvf /vagrant/alpine-rootfs.tar.gz -C /home/vagrant/containers/fs/rootfs-alpine/
tar -xzvf /vagrant/ubuntu-rootfs.tar.gz -C /home/vagrant/containers/fs/rootfs-ubuntu/
sudo cp -f /home/vagrant/.bashrc /root/.bashrc