changed order of commands in dockerfile for better caching