refactor(controller): optimize layer creation

This restructures the Dockerfile in such a way that allows users to rebuild the
controller with minimal changes to the docker image's layers.
I know this wasn't part of your PR, but I must point out: if you ever do an `apt-get install` in a Dockerfile that isn't preceded by `apt-get update &&`, you have started the clock on a little time bomb that will eventually break your build on the Docker Index. As soon an `apt-get update` layer is cached, the potential for a subsequent `apt-get install` to fail is there; the cached mirrors may have stale info or no longer exist.