Here is an attempt at working around adding .git into dockers accidentally, an issue you saw earlier.
Docker is written in go and supports some wildcards in the ADD command. https://stackoverflow.com/questions/26591862/using-docker-add-command-for-multiples-files links to: https://golang.org/src/path/filepath/match_test.go
Putting that together,
nfultz@nfultz:dockertest$tree -a
.