This answer is out of date. Fig not longer exists and has been replaced by Docker compose. Accepted answers cannot be deleted ....
Docker Compose supports the building of project hierachy. So it's now easy to support a Dockerfile in each sub directory.
+-- docker-compose.yml
+-- project1
¦ +-- Dockerfile
+-- project2
+-- Dockerfile
I just create a directory containing a Dockerfile for each component. Example:
When building the containers just give the directory name and Docker will select the correct Dockerfile.