Modularize dockerfile

Seems to work well.
same here