github.com/containerd/nerdctl/v2@v2.0.0-beta.5.0.20240520001846-b5758f54fa28/Vagrantfile.freebsd (about) 1 # -*- mode: ruby -*- 2 # vi: set ft=ruby : 3 4 # Copyright The containerd Authors. 5 # 6 # Licensed under the Apache License, Version 2.0 (the "License"); 7 # you may not use this file except in compliance with the License. 8 # You may obtain a copy of the License at 9 10 # http://www.apache.org/licenses/LICENSE-2.0 11 12 # Unless required by applicable law or agreed to in writing, software 13 # distributed under the License is distributed on an "AS IS" BASIS, 14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 # See the License for the specific language governing permissions and 16 # limitations under the License. 17 18 # Vagrantfile for FreeBSD 19 Vagrant.configure("2") do |config| 20 config.vm.box = "generic/freebsd14" 21 22 memory = 2048 23 cpus = 1 24 config.vm.provider :virtualbox do |v, o| 25 v.memory = memory 26 v.cpus = cpus 27 end 28 config.vm.provider :libvirt do |v| 29 v.memory = memory 30 v.cpus = cpus 31 end 32 33 config.vm.synced_folder ".", "/vagrant", type: "rsync" 34 35 config.vm.provision "install", type: "shell", run: "once" do |sh| 36 sh.inline = <<~SHELL 37 #!/usr/bin/env bash 38 set -eux -o pipefail 39 # `pkg install go` still installs Go 1.20 (March 2024) 40 pkg install -y go122 containerd runj 41 ln -s go122 /usr/local/bin/go 42 cd /vagrant 43 go install ./cmd/nerdctl 44 SHELL 45 end 46 47 config.vm.provision "test-unit", type: "shell", run: "never" do |sh| 48 sh.inline = <<~SHELL 49 #!/usr/bin/env bash 50 set -eux -o pipefail 51 cd /vagrant 52 go test -v ./pkg/... 53 SHELL 54 end 55 56 config.vm.provision "test-integration", type: "shell", run: "never" do |sh| 57 sh.inline = <<~SHELL 58 #!/usr/bin/env bash 59 set -eux -o pipefail 60 daemon -o containerd.out containerd 61 sleep 3 62 /root/go/bin/nerdctl run --rm --net=none dougrabson/freebsd-minimal:13 echo "Nerdctl is up and running." 63 SHELL 64 end 65 66 end