31 lines
1.0 KiB
Ruby
Executable File
31 lines
1.0 KiB
Ruby
Executable File
VAGRANTFILE_API_VERSION = "2"
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
|
|
# Configure cached packages to be shared between instances of the same base box.
|
|
if Vagrant.has_plugin?("vagrant-cachier")
|
|
config.cache.scope = :box
|
|
end
|
|
|
|
# Define a Docker host (Vagrant VM) with a Linux kernel
|
|
config.vm.define "dockerhost" do |host|
|
|
host.vm.box = "hashicorp/precise64"
|
|
host.vm.provision "docker"
|
|
# disable SSH
|
|
host.vm.provision "shell", inline:
|
|
"ps aux | grep 'sshd:' | awk '{print $2}' | xargs kill"
|
|
# forward ports as required
|
|
host.vm.network "forwarded_port",
|
|
guest: 5000, host: 5000, auto_correct: true
|
|
host.vm.network "forwarded_port",
|
|
guest: 8080, host: 8080, auto_correct: true
|
|
host.vm.network "forwarded_port",
|
|
guest: 8800, host: 8800, auto_correct: true
|
|
host.vm.network "forwarded_port",
|
|
guest: 8983, host: 8983, auto_correct: true
|
|
host.vm.network "forwarded_port",
|
|
guest: 5432, host: 5432, auto_correct: true
|
|
end
|
|
|
|
end
|