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.
Just pointing out credit where credit is due: this knowledge bomb came from https://registry.hub.docker.com/u/google/python-runtime/dockerfile :)