Skip to content

Instantly share code, notes, and snippets.

@shihanng
Last active December 1, 2015 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shihanng/8530797212f8bd34f9a7 to your computer and use it in GitHub Desktop.
Save shihanng/8530797212f8bd34f9a7 to your computer and use it in GitHub Desktop.
Developing with Vagrant and Docker @ HDE Blog (Vagrantfile)
Vagrant.configure("2") do |config|
config.vm.define "redis" do |r|
r.vm.provider "docker" do |d|
d.image = "redis:latest"
d.name = "redis"
d.ports = ["6379:6379"]
d.vagrant_vagrantfile = "./docker-host-vm/Vagrantfile"
end
end
config.vm.define "hello" do |h|
h.vm.provider "docker" do |d|
d.build_dir = "./hello"
d.build_args = ["-t=go_im"]
d.name = "go_con"
d.vagrant_vagrantfile = "./docker-host-vm/Vagrantfile"
d.ports = ["8000:8080"]
d.volumes = ["/src/hello:/go/src/hello/"]
d.cmd = ["go", "run", "/go/src/hello/hello.go"]
d.link("redis:redis")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment