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.