Rebased Dockerignore

Close #4165
Fixes #2224
Why is this ignored if the error is not nil ?