For a gentle introduction to cross compiling for the pi with Docker try here
First we need a Docker image with the cross compilation tools installed, so we'll grab the one from above:
docker pull mitchallen/pi-cross-compile
Create the build directory & cd into it
git clone git://git.drogon.net/wiringPi