ref(all): Flatten Dockerfiles

Flattens the layers in Dockerfiles for builder, cache, controller,
database, registry, and router to improve performance.

closes #1824