mirror of
https://github.com/moby/buildkit.git
synced 2026-06-24 08:47:57 +00:00
79 lines
2.1 KiB
Ruby
79 lines
2.1 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure("2") do |config|
|
|
config.vm.box = "bento/freebsd-14"
|
|
config.vm.box_version = "202508.03.0"
|
|
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
|
|
#!/bin/sh
|
|
set -eux
|
|
freebsd-version -kru
|
|
kldstat -m nullfs >/dev/null 2>&1 || kldload nullfs
|
|
pkg bootstrap
|
|
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
|
|
#!/bin/sh
|
|
set -eux
|
|
cd /vagrant
|
|
install -m 755 bin/buildkitd /usr/local/bin/buildkitd
|
|
test -x /usr/local/bin/buildkitd
|
|
buildkitd --version
|
|
SHELL
|
|
end
|
|
|
|
config.vm.provision "install-buildctl", type: "shell", run: "once" do |sh|
|
|
sh.inline = <<~SHELL
|
|
#!/bin/sh
|
|
set -eux
|
|
cd /vagrant
|
|
install -m 755 bin/buildctl /usr/local/bin/buildctl
|
|
test -x /usr/local/bin/buildctl
|
|
SHELL
|
|
end
|
|
|
|
config.vm.provision "run-containerd", type: "shell", run: "once" do |sh|
|
|
sh.inline = <<~SHELL
|
|
#!/bin/sh
|
|
set -eux
|
|
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
|
|
#!/bin/sh
|
|
set -eux
|
|
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
|
|
#!/bin/sh
|
|
set -eux
|
|
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
|