This is such a great question that I wrote I little post about it. In short I download the repo via wget and copy the data in the Docker image.
Here are the detail about how I do it: http://pascalandy.com/blog/best-practices-for-getting-code-into-a-container-git-clone-vs-copy-vs-data-container/
Cheers!
Pascal | Twitter