-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
39 lines (30 loc) · 1.1 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
Vagrant.configure(2) do |config|
config.vm.define "rancheros-lite-test"
config.vm.box = "rancheros-lite"
config.vm.hostname = "rancheros-lite-test.example.com"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder ".", "/vagrant"
# config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ["nolock", "vers=3", "udp"]
config.vm.provider :virtualbox do |vb|
vb.name = "rancheros-lite-test"
vb.gui = true
end
if Vagrant.has_plugin?("vagrant-triggers") then
config.trigger.after [:up, :resume] do
info "Adjusting datetime after suspend and resume."
run_remote "sudo sntp -4sSc pool.ntp.org; date"
end
end
# Adjusting datetime before provisioning.
config.vm.provision :shell, run: "always" do |sh|
sh.inline = "sntp -4sSc pool.ntp.org; date"
end
config.vm.provision :docker do |d|
d.pull_images "busybox"
d.run "simple-echo",
image: "busybox",
args: "-p 8080:8080 --restart=always",
cmd: "nc -p 8080 -l -l -e echo hello world!"
end
config.vm.network :forwarded_port, guest: 8080, host: 8080
end