This is how to easily setup a VM with Docker and Docker Remote API enabled.
We use VirtualBox, Vagrant and Docker for that.
First install VirtualBox https://www.virtualbox.org/wiki/Downloads
and Vagrant https://www.vagrantup.com/downloads.html
Run vagrant version to check that vagrant is correctly installed.
Save the Vagrantfile from this gist to a local directory.
Go inside the directory and run vagrant up. The first startup will take a few minutes to download everything.
Then you have a ready to use Virtual Machine with Docker.
To STOP, but not delete the VM run vagrant suspend.
To DELETE the VM run vagrant destroy.
Restart the VM with vagrant up
Run vagrant ssh to login to your VM.
On Windows you might have to put ssh.exe to your %PATH%. If you have installed git, you can use C:\Program Files\Git\usr\bin
You can also login via Putty on host: "localhost", Port "2222", login: "vagrant", password: "vagrant".