development/Vagrantfile in vocker-0.3.3 vs development/Vagrantfile in vocker-0.4.0

- old
+ new

@@ -29,16 +29,32 @@ fi ] config.vm.define :vm1 do |vm1| vm1.vm.provision :docker do |docker| - docker.pull_images 'ubuntu', 'busybox' + docker.pull_images '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 + # TODO: Clean up these examples + vm2.vm.provision :docker do |docker| + docker.version = '0.6.5' + + hello_daemon = 'while true; do date; date > /tmp/testing/dates.log; date +%s > /var/lib/other/seconds; echo hello world; sleep 1; done' + docker.run 'date', + image: 'busybox', + volumes: ['/tmp/testing:/tmp/testing', '/var/lib/other'], + ports: ['8080/udp', '8081:80'], + cmd: "/bin/sh -c '#{hello_daemon}'" + + hello_daemon = 'while true; do date; echo hello world; sleep 1; done' + docker.run 'date-2', + image: 'busybox', + link: ['date:datetime'], + cmd: "/bin/sh -c '#{hello_daemon}'" + end end end