-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
35 lines (26 loc) · 842 Bytes
/
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provision "shell", inline: <<-SHELL
set -e
# Running the container with `sudo` go will
# look for the root's GOPATH.
export GOPATH="/root/go"
export PATH="$PATH:$GOPATH/bin"
mkdir -p $GOPATH/bin
mkdir -p $GOPATH/pkg
mkdir -p $GOPATH/src
add-apt-repository ppa:gophers/archive
apt-get update -y
apt-get install golang-1.10-go -y
export PATH="/usr/lib/go-1.10/bin:$PATH"
mkdir -p $GOPATH/src/github.com/jmuia/go-container/
cp -r /vagrant/. $GOPATH/src/github.com/jmuia/go-container/
cd $GOPATH/src/github.com/jmuia/go-container/
# yikes!
curl https://glide.sh/get | sh
glide install -v
CGO_ENABLED=0 GOOS=linux go build -a
SHELL
end