reorder dependencies in Dockerfiles