Skip to content

Instantly share code, notes, and snippets.

@cmbaughman
Created June 4, 2014 13:29
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 cmbaughman/495bce38f18ab4b4236d to your computer and use it in GitHub Desktop.
Save cmbaughman/495bce38f18ab4b4236d to your computer and use it in GitHub Desktop.
How to set up Vagrant to use the Docker Provisioner

How to set up Vagrant do build/configure Dockers

  1. Put the dockerfile that you want to use in a directory next to your vagrantfile.

  2. In the vagrantfile put the following:

config.vm.provision "docker" do |d|
  d.build_image "/vagrant", args: "-t my-name/my-new-image"
  d.run "my-name/my-new-image"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment