apply some tips from https://docs.docker.com/articles/dockerfile_best-practices/