Spend some time setting up Kali linux with docker on OS X. There is plenty of good guides out there, but still stumbled a lot on the way. Here are the most important commands it boiled down to for me.
Docker is this really cool way of making containers for software. It's kind of like virtual machines but much more lightweight and efficient. More fun.
$ brew install docker $ brew install boot2docker
Create the vm
$ boot2docker init
Start the vm
$ boot2docker start
Run a kali linux image, you can find one on docker hub. There are some with metasploit included already. I started out from this one.
$ docker run -t -i pandrew/kali
Install metasploit using apt-get, will automatically get dependencies, e.g. postgresql
$ apt-get update && apt-get upgrade $ apt-get install metasploit
To commit(save) changes to your image and continue off where you left next time. First exit your image then use
$ docker ps to get the container id.
$ docker ps
Commit the container id to an image name of your choice.
$ docker commit CONTAINER_ID YOUR_IMAGE_NAME
Continue where you left off
$ docker run -t -i YOUR_IMAGE_NAME