Build with URL Error

The Build with URL instructions found here work for Ubuntu and Mac but do not work for CentOS. When I attempt to build on CentOS I see the following error:

[brendan@yawl2 ~]$ docker build github.com/creack/docker-firefox
unable to prepare context: unable to 'git clone' to temporary context directory: error initializing submodules: usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
: exit status 1

Docker 18.02 run a git submodule update --init --recursive --depth=1 after a git clone. However --depth parameter is not supported by git below 2.10. If you are using CentOS(7.5 comes with git 1.8.3.1) like me, just upgrade your git.

# for EL7
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm
sudo yum swap git git2u