Sha256: b5288d21db821d7e10a9a8140ee59721c2f2e274b920f47ff3d2c8bbd3f5ea8e

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.require_plugin 'vagrant-lxc'
Vagrant.require_plugin 'vagrant-cachier'
Vagrant.require_plugin 'vagrant-pristine'
Vagrant.require_plugin 'vagrant-global-status'
Vagrant.require_plugin 'vocker'

Vagrant.configure("2") do |config|
  config.vm.box = "raring64"
  config.vm.synced_folder "../", "/vagrant", id: 'vagrant-root'#, nfs: true
  config.vm.synced_folder "~/projetos/oss/ventriloquist", "/home/vagrant/ventriloquist"
  config.vm.network :private_network, ip: "192.168.123.123"

  config.cache.auto_detect = true

  config.vm.provider :lxc do |lxc|
    # Required to boot nested containers
    lxc.customize 'aa_profile', 'unconfined'
  end

  config.vm.provision :shell, inline: %[
    if ! [ -f /etc/default/lxc ]; then
      cat <<STR > /etc/default/lxc
LXC_AUTO="true"
USE_LXC_BRIDGE="true"
LXC_BRIDGE="lxcbr0"
LXC_ADDR="10.0.253.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="10.0.253.0/24"
LXC_DHCP_RANGE="10.0.253.2,10.0.253.254"
LXC_DHCP_MAX="253"
LXC_SHUTDOWN_TIMEOUT=120
STR
    fi
  ]

  config.vm.define :vm1 do |vm1|
    vm1.vm.provision :docker do |docker|
      docker.pull_images 'ubuntu', 'busybox'
      docker.run 'echo ls -la --color', 'ubuntu'
      docker.run 'echo ls -la --color', image: 'ubuntu'  # Above is the default
      docker.run 'date', image: 'ubuntu', cmd: '/bin/sh -c "while true; date; do echo hello world; sleep 1; done"'
    end
  end

  config.vm.define :vm2 do |vm2|
    vm2.vm.provision :docker
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vocker-0.1.0 development/Vagrantfile