build: change order of commands in Dockerfile