forked from pablokbs/peladonerd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
30 lines (25 loc) · 1.14 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
$script = <<-SCRIPT
curl -sSL https://get.docker.com/ | sh
# Add vagrant user to the docker group
usermod -a -G docker vagrant
diff -q /etc/systemd/system/multi-user.target.wants/docker.service /home/vagrant/docker.service || cp /home/vagrant/docker.service /etc/systemd/system/multi-user.target.wants/docker.service
systemctl daemon-reload
systemctl restart docker.service
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
# Checkea las opciones aqui https://www.vagrantup.com/docs/networking/private_network
config.vm.network "private_network", ip: "192.168.100.2"
config.vm.synced_folder "~/docker", "/home/vagrant/docker"
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
config.vm.provision "file", source: "docker.service", destination: "/home/vagrant/docker.service"
config.vm.provision :shell, :inline => $script
end