Modularize dockerfile

Seems to work well.
I would leave this in the base image