Ignore git in dockerignore, but keep HEAD and refs.
Ignore git in dockerignore, but keep HEAD and refs.

Closes #4735

This allows accessing current commit hash without including
the entire repo in the docker build context.

Example:

$ git show HEAD --pretty=full | head -n 1
commit d0b8727759e1e0e7aa3d41707d12376e373d5ecc

$ cat .git/HEAD
ref: refs/heads/master

$ cat .git/HEAD | awk '{print ".git/"$2}' | xargs cat
d0b8727759e1e0e7aa3d41707d12376e373d5ecc

Co-authored-by: Gary Rennie <8d8cdd8554fa832780fdb6e3f92477f6cc403c1e@gmail.com>

rafbgarcia/phoenix,0x00evil/phoenix,phoenixframework/phoenix,phoenixframework/phoenix,optikfluffel/phoenix,0x00evil/phoenix,rafbgarcia/phoenix,optikfluffel/phoenix,0x00evil/phoenix,optikfluffel/phoenix,rafbgarcia/phoenix,phoenixframework/phoenix