Sha256: 8d5832453ec266ba9c6ad1a06e006fdb07a265fa7a05bfec1577d571364d54cd

Contents?: true

Size: 1.27 KB

Versions: 2

Compression:

Stored size: 1.27 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.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

  # Required to boot nested containers
  config.vm.provision :shell, inline: %[
    if ! [ -f /etc/default/lxc ]; then
      cat <<STR > /etc/default/lxc
LXC_AUTO="false"
USE_LXC_BRIDGE="false"
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', 'busybox'
      docker.run 'echo ls -la --color', image: 'busybox'  # Above is the default
      docker.run 'date', additional_run_args: '-p 1234:562', image: 'busybox', 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

2 entries across 2 versions & 1 rubygems

Version Path
vocker-0.3.3 development/Vagrantfile
vocker-0.3.2 development/Vagrantfile