Question: How do you organize the Dockerfiles belonging to a project when you have one Dockerfile for the database, one for the application server, and so on? Do you create some sort of hierachy in the source?
A big enterprise project can't consist of only one Dockerfile?

Answer: 
In [newer versions(>=1.8.0) of docker](https://github.com/docker/docker/wiki), you can do this

```bash
docker build -f Dockerfile.db .
docker build -f Dockerfile.web .

```

A big save.

EDIT: update versions per raksja's comment

EDIT: comment from @vsevolod: it's possible to get syntax highlighting in VS code by giving files .Dockerfile extension(instead of name) e.g. Prod.Dockerfile, Test.Dockerfile etc.
In Intellij, I simply changed the name of the docker files to \*.Dockerfile, and associated the file type \*.Dockerfile to docker syntax.