-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
48 lines (39 loc) · 1.78 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
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-24.04"
config.vm.synced_folder '.', '/brownie'
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = "2"
end
config.vm.provision "shell", inline: <<-SHELL
set -e -x -o pipefail
apt-get update && apt-get install -y ca-certificates wget make vim gcc libseccomp-dev
# Install docker
if ! command -v docker 2>&1 >/dev/null; then
wget \
https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/containerd.io_1.7.24-1_amd64.deb \
https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce-cli_27.3.1-1~ubuntu.22.04~jammy_amd64.deb \
https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce_27.3.1-1~ubuntu.22.04~jammy_amd64.deb \
https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-buildx-plugin_0.17.1-1~ubuntu.22.04~jammy_amd64.deb \
https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-compose-plugin_2.29.7-1~ubuntu.22.04~jammy_amd64.deb
dpkg -i \
containerd.io_*_amd64.deb \
docker-ce-cli_*_amd64.deb \
docker-ce_*_amd64.deb \
docker-buildx-plugin_*_amd64.deb \
docker-compose-plugin_*_amd64.deb
# Add user to docker group
gpasswd -a vagrant docker
fi
# Stop and start Docker service with brownie runtime
service docker stop
dockerd --add-runtime brownie=/brownie/tmp/bin/brownie \
> /dev/null 2>&1 & disown
# Install go
if ! command -v go 2>&1 >/dev/null; then
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz -O go.tar.gz
tar -C /usr/local -xzf go.tar.gz
echo "PATH=$PATH:/usr/local/go/bin" >> /etc/environment
fi
SHELL
end