-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathVagrantfile.freebsd
75 lines (68 loc) · 2.08 KB
/
Vagrantfile.freebsd
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/freebsd14"
config.vm.boot_timeout = 900
config.vm.synced_folder ".", "/vagrant", type: "rsync"
config.ssh.keep_alive = true
config.vm.provision "init", type: "shell", run: "once" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
kldload nullfs
pkg install -y git runj
mkdir -p /vagrant/coverage /vagrant/.tmp/logs
SHELL
end
config.vm.provision "install-buildkitd", type: "shell", run: "once" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
cd /vagrant
install -m 755 bin/buildkitd /usr/local/bin/buildkitd
type /usr/local/bin/buildkitd
buildkitd --version
SHELL
end
config.vm.provision "install-buildctl", type: "shell", run: "once" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
cd /vagrant
install -m 755 bin/buildctl /usr/local/bin/buildctl
type /usr/local/bin/buildctl
SHELL
end
config.vm.provision "run-containerd", type: "shell", run: "once" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
cd /vagrant
install -m 755 bin/containerd /bin/containerd
containerd --version
daemon -o /vagrant/.tmp/logs/containerd containerd
SHELL
end
config.vm.provision "run-buildkitd", type: "shell", run: "once" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
mkdir -p /run/buildkit
daemon -o /vagrant/.tmp/logs/buildkitd /usr/local/bin/buildkitd
sleep 3
SHELL
end
config.vm.provision "test-smoke", type: "shell", run: "never" do |sh|
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
mkdir -p /vagrant/.tmp/freebsd-smoke
cd /vagrant/.tmp/freebsd-smoke
cat > Dockerfile <<EOF
FROM dougrabson/freebsd-minimal:13
RUN echo "Hello, buildkit!"
EOF
buildctl build --frontend dockerfile.v0 --local context=. --local dockerfile=.
SHELL
end
end