OK.
So I have a Vagrant file – and I can
vagrant up
and
vagrant halt
and
vagrant up
etc and all is fine.
But then I want to add docker to my VM – just Docker – no docker images/containers etc – just the docker tool.
So in my Vagrant file I add in:
config.vm.provision "docker"
in the main block in between
Vagrant.configure(2) do |config|
and
end
I then halt the machine and then ‘vagrant up’ it again – log in – but – no docker command!
Turns out that provisioning only runs on the ‘up’ command when it is run for the first time – after that provisioning is ignored (which makes sense I suppose). To get it to run the provision stuff you need to call:
$ vagrant up --provision
It’s all explained here:
http://docs.vagrantup.com/v2/provisioning/