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 Intellij, I simply changed the name of the docker files to \*.Dockerfile, and associated the file type \*.Dockerfile to docker syntax.
Add an abstraction layer, for example, a YAML file like in this project <https://github.com/larytet/dockerfile-generator> which looks like 

```yaml
centos7:
    base: centos:centos7
    packager: rpm
    install:
      - $build_essential_centos 
      - rpm-build
    run:
      - $get_release
    env:
      - $environment_vars

```

A short Python script/make can generate all Dockerfiles from the configuration file.