Install Docker via a Vagrantfile

Tons of ways of doing this on the internet – many that don’t work for various reasons – e.g. older versions of Ubuntu, etc… – and ranging from complex to very complex.

Here’s two simple ways:

  1. Most simple

Paste into a Vagrantfile:

2. A little more manual using Docker’s convenience script:

Paste into a Vagrantfile:


Here’s what didn’t work for me:

I guess it doesn’t help that precise64┬áis quite an old version of Ubuntu but it’s what was given on the Vagrant website for provisioning Docker.


which I basically ignored ‘cos it didn’t have a correct concrete example as of the time of writing this blog post (even though it’s Hashicorp’s own website!).

Leave a Reply

Your email address will not be published. Required fields are marked *