Support submodules when building from a gh repo

Docker-DCO-1.1-Signed-off-by: Song Gao <song@gao.io> (github: songgao)
Merge pull request #3463 from songgao/patch-2

Support submodules when building from a gh repo