Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "yungsang/boot2docker"
config.vm.box_version = ">= 0.9.3"
config.vm.provision :docker do |d|
d.pull_images "yungsang/busybox"
d.run "simple-echo",
image: "yungsang/busybox",
args: "-p 8080:8080",
cmd: "nc -p 8080 -l -l -e echo hello world!"
end
config.vm.network :forwarded_port, guest: 8080, host: 8080
end
$ vagrant up
$ nc localhost 8080
hello world!
Cf.) Quickstart Docker example with google/busybox on boot2docker for Vagrant
https://gist.github.com/YungSang/7b37b484d97af34557c6