Rebased Dockerignore

Close #4165
Fixes #2224
The code which handles this isn't that complicated, so I'm OK with having globbing.