flattening Dockerfile for better build efficiency