re-organise dockerfile

re-organise to prevent unnecessarily large docker image
being created.