The file seems to be there...
➜ myrepo git:(master) ✗ ls .dockerignore
.dockerignore
And here's what the file looks like:
➜ myrepo git:(master) ✗ cat .dockerignore
.git
node_modules
build
coverage
When I run the command, it goes and tries to shove both node_modules and build into the context:
➜ myrepo git:(master) ✗ docker build . --target development -t myrepo/myproject:latest
^Cnding build context to Docker daemon 209.5MB
The unignored files shouldn't total to more than ~20mb.